IGNITE-8292: Broken yardstick compilation. this closes #3840
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3cebf912 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3cebf912 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3cebf912 Branch: refs/heads/ignite-7708 Commit: 3cebf9123ed1161822ece503169b361f49293358 Parents: 8c80dce Author: YuriBabak <y.ch...@gmail.com> Authored: Tue Apr 17 11:54:41 2018 +0300 Committer: Yury Babak <yba...@gridgain.com> Committed: Tue Apr 17 11:54:41 2018 +0300 ---------------------------------------------------------------------- ...niteKMeansDistributedClustererBenchmark.java | 75 -------------------- .../IgniteKMeansLocalClustererBenchmark.java | 50 ------------- .../yardstick/ml/clustering/package-info.java | 22 ------ 3 files changed, 147 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/3cebf912/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansDistributedClustererBenchmark.java ---------------------------------------------------------------------- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansDistributedClustererBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansDistributedClustererBenchmark.java deleted file mode 100644 index de928e8..0000000 --- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansDistributedClustererBenchmark.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.yardstick.ml.clustering; - -import java.util.Map; -import org.apache.ignite.Ignite; -import org.apache.ignite.ml.clustering.KMeansDistributedClusterer; -import org.apache.ignite.ml.math.StorageConstants; -import org.apache.ignite.ml.math.distances.EuclideanDistance; -import org.apache.ignite.ml.math.impls.matrix.SparseDistributedMatrix; -import org.apache.ignite.resources.IgniteInstanceResource; -import org.apache.ignite.thread.IgniteThread; -import org.apache.ignite.yardstick.IgniteAbstractBenchmark; -import org.apache.ignite.yardstick.ml.DataChanger; - -/** - * Ignite benchmark that performs ML Grid operations. - */ -@SuppressWarnings("unused") -public class IgniteKMeansDistributedClustererBenchmark extends IgniteAbstractBenchmark { - /** */ - @IgniteInstanceResource - private Ignite ignite; - - /** {@inheritDoc} */ - @Override public boolean test(Map<Object, Object> ctx) throws Exception { - final DataChanger.Scale scale = new DataChanger.Scale(); - - // Create IgniteThread, we must work with SparseDistributedMatrix inside IgniteThread - // because we create ignite cache internally. - IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(), - this.getClass().getSimpleName(), new Runnable() { - /** {@inheritDoc} */ - @Override public void run() { - // IMPL NOTE originally taken from KMeansDistributedClustererTest - KMeansDistributedClusterer clusterer = new KMeansDistributedClusterer( - new EuclideanDistance(), 1, 1, 1L); - - double[] v1 = scale.mutate(new double[] {1959, 325100}); - double[] v2 = scale.mutate(new double[] {1960, 373200}); - - SparseDistributedMatrix points = new SparseDistributedMatrix( - 2, 2, StorageConstants.ROW_STORAGE_MODE, StorageConstants.RANDOM_ACCESS_MODE); - - points.setRow(0, v1); - points.setRow(1, v2); - - clusterer.cluster(points, 1); - - points.destroy(); - } - }); - - igniteThread.start(); - - igniteThread.join(); - - return true; - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/3cebf912/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansLocalClustererBenchmark.java ---------------------------------------------------------------------- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansLocalClustererBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansLocalClustererBenchmark.java deleted file mode 100644 index d68fc6d..0000000 --- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansLocalClustererBenchmark.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.yardstick.ml.clustering; - -import java.util.Map; -import org.apache.ignite.ml.clustering.KMeansLocalClusterer; -import org.apache.ignite.ml.math.distances.EuclideanDistance; -import org.apache.ignite.ml.math.impls.matrix.DenseLocalOnHeapMatrix; -import org.apache.ignite.yardstick.IgniteAbstractBenchmark; -import org.apache.ignite.yardstick.ml.DataChanger; - -/** - * Ignite benchmark that performs ML Grid operations. - */ -@SuppressWarnings("unused") -public class IgniteKMeansLocalClustererBenchmark extends IgniteAbstractBenchmark { - /** {@inheritDoc} */ - @Override public boolean test(Map<Object, Object> ctx) throws Exception { - final DataChanger.Scale scale = new DataChanger.Scale(); - - // IMPL NOTE originally taken from KMeansLocalClustererTest - KMeansLocalClusterer clusterer = new KMeansLocalClusterer(new EuclideanDistance(), 1, 1L); - - double[] v1 = scale.mutate(new double[] {1959, 325100}); - double[] v2 = scale.mutate(new double[] {1960, 373200}); - - DenseLocalOnHeapMatrix points = new DenseLocalOnHeapMatrix(new double[][] { - v1, - v2}); - - clusterer.cluster(points, 1); - - return true; - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/3cebf912/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/package-info.java ---------------------------------------------------------------------- diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/package-info.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/package-info.java deleted file mode 100644 index af217d2..0000000 --- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * <!-- Package description. --> - * ML Grid clustering benchmarks. - */ -package org.apache.ignite.yardstick.ml.clustering; \ No newline at end of file