Skip to content

EclairJS Spark Examples

EclairJS edited this page Mar 24, 2016 · 17 revisions

Many of the examples provided for Apache Spark have been replicated in EclairJS. The table below provides a catalog of these examples for easy navigation and cross-reference.

Library EclairJS-Node EclairJS-Nashorn Apache Spark
SQL
[sparkjdbc] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/sql/sparkjdbc.js) [] ()
[sparksql] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/sql/sparksql.js) [JavaSparkSQL] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/sql/JavaSparkSQL.java)
Streaming
[direct_kafka_word_count] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/streaming/direct_kafka_word_count.js) [JavaDirectKafkaWordCount] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/streaming/JavaDirectKafkaWordCount.java)
[kafka_word_count] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/streaming/kafka_word_count.js) [JavaKafkaWordCount] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/streaming/JavaKafkaWordCount.java)
[network_word_count] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/streaming/network_word_count.js) [JavaNetworkWordCount] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/streaming/JavaNetworkWordCount.java)
[queue_count] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/streaming/queue_count.js) [JavaQueueStream] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/streaming/JavaQueueStream.java)
[recoverable_network_word_count] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/streaming/recoverable_network_word_count.js) [JavaRecoverableNetworkWordCount] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/streaming/JavaRecoverableNetworkWordCount.java)
[twitter_popular_tags] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/streaming/twitter_popular_tags.js)
ml
[word2vec_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/ml/word2vec_example.js) [JavaWord2VecExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/ml/JavaWord2VecExample.java)
mllib
[als] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/als.js) [als] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/als.js) [JavaALS] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaALS.java)
[associationrules] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/associationrules.js) [association_rules_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/association_rules_example.js) [JavaAssociationRulesExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaAssociationRulesExample.java)
[binaryclassification] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/binaryclassification.js) [binary_classification_metrics_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/binary_classification_metrics_example.js) [JavaBinaryClassificationMetricsExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaBinaryClassificationMetricsExample.java)
[bisectingkmean] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/bisectingkmean.js) [bisecting_k_means_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/bisecting_k_means_example.js) [JavaBisectingKMeansExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaBisectingKMeansExample.java)
[decisiontreeclassification] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/decisiontreeclassification.js) [decision_tree_classification_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/decision_tree_classification_example.js) [JavaDecisionTreeClassificationExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaDecisionTreeClassificationExample.java)
[] () [decision_tree_regression_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/decision_tree_regression_example.js) [JavaDecisionTreeRegressionExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaDecisionTreeRegressionExample.java)
[fpgrowth] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/fpgrowth.js) [fp_growth_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/fp_growth_example.js) [JavaFPGrowthExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaFPGrowthExample.java)
[gradientboostingclassification] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/gradientboostingclassification.js) [gradient_boosting_classification_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/gradient_boosting_classification_example.js) [JavaGradientBoostingClassificationExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaGradientBoostingClassificationExample.java)
[gradientboostingregression] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/gradientboostingregression.js) [gradient_boosting_regression_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/gradient_boosting_regression_example.js) [JavaGradientBoostingRegressionExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaGradientBoostingRegressionExample.java)
[isotonicregression] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/isotonicregression.js) [isotonic_regression_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/isotonic_regression_example.js) [JavaIsotonicRegressionExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaIsotonicRegressionExample.java)
[kmeans] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/kmeans.js) [kmeans_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/kmeans_example.js) [JavaKMeansExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaKMeansExample.java)
[lbfgs] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/lbfgs.js) [lbfgs_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/lbfgs_example.js) [JavaLBFGSExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaLBFGSExample.java)
[lda] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/lda.js) [lda_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/lda_example.js) [JavaLDAExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaLDAExample.java)
[linearregressiontest] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/linearregressiontest.js) [linear_regression_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/linear_regression_example.js) [JavaLinearRegressionWithSGDExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaLinearRegressionWithSGDExample.java)
[lr] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/lr.js) [lr_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/lr_example.js) [] ()
[multiclassclassificationmetrics] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/multiclassclassificationmetrics.js) [multiclass_classification_metrics_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/multiclass_classification_metrics_example.js) [JavaMulticlassClassificationMetricsExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaMulticlassClassificationMetricsExample.java.java)
[] () [multilabel_classification_metrics_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/multilabel_classification_metrics_example.js) [JavaMultiLabelClassificationMetricsExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaMultiLabelClassificationMetricsExample.java)
[naivebayes] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/naivebayes.js) [naive_bayes_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/naive_bayes_example.js) [JavaNaiveBayesExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaNaiveBayesExample.java)
[pca] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/pca.js) [pca_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/pca_example.js) [JavaPCAExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaPCAExample.java)
[poweriterationclustering] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/poweriterationclustering.js) [power_iteration_clustering_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/power_iteration_clustering_example.js) [JavaPowerIterationClusteringExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaPowerIterationClusteringExample.java)
[randomforestclassification] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/randomforestclassification.js) [random_forest_classification_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/random_forest_classification_example.js) [JavaRandomForestClassificationExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaRandomForestClassificationExample.java)
[randomforestregression] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/randomforestregression.js) [random_forest_regression_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/random_forest_regression_example.js) [JavaRandomForestRegressionExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaRandomForestRegressionExample.java)
[randomrddgeneration] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/randomrddgeneration.js) [random_rdd_generation_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/random_rdd_generation_example.js) [] ()
[rankingmetrics] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/rankingmetrics.js) [ranking_metrics_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/ranking_metrics_example.js) [JavaRankingMetricsExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaRankingMetricsExample.java)
[recommendation] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/recommendation.js) [] () [JavaRecommendationExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaRecommendationExample.java)
[regressionmetrics] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/regressionmetrics.js) [regression_metrics_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/regression_metrics_example.js) [JavaRegressionMetricsExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaRegressionMetricsExample.java)
[sampledrdd] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/sampledrdd.js) [sampled_rdds] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/sampled_rdds.js) [] ()
[svd] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/svd.js) [svd_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/svd_example.js) [JavaSVDExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaSVDExample.java)
[svmwithsgd] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/svmwithsgd.js) [svm_with_sgd_example] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/svm_with_sgd_example.js) [JavaSVMWithSGDExample] (https://github.com/apache/spark/blob/master/examples/src/main/java/org/apache/spark/examples/mllib/JavaSVMWithSGDExample.java)
[word2vec] (https://github.com/EclairJS/eclairjs-node/blob/master/examples/mllib/word2vec.js) [word2vec] (https://github.com/EclairJS/eclairjs-nashorn/blob/master/examples/mllib/word2vec.js) [] ()
Clone this wiki locally