Skip to content

Commit

Permalink
Updated examples (and tested) to use EJS Client 0.9 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackie Barbetta committed Nov 7, 2016
1 parent 666e88f commit 2846033
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion airline-demo/package.json
Expand Up @@ -20,7 +20,7 @@
"socket.io": "^1.3.6",
"node-rest-client": "^1.5.1",
"ws": "^0.8.0",
"eclairjs": "^0.8"
"eclairjs": "^0.9"
},
"devDependencies": {
},
Expand Down
2 changes: 1 addition & 1 deletion movie_recommender_express/package.json
Expand Up @@ -9,6 +9,6 @@
"express": "3.2.6",
"jade": "*",
"ws": "~1.0",
"eclairjs": "^0.8"
"eclairjs": "^0.9"
}
}
Expand Up @@ -8,13 +8,7 @@ var spark = new eclairjs();
var pathToSmallDataset = process.env.SMALL_DATASET;
var pathToCompleteDataset = process.env.LARGE_DATASET;

// TODO: We need a new npm release of EclairJS Client for SAVED_DATA to work.
// In the 0.8 release sql.Dataset.write() is not implemented for Client but it is on master.
// Workaround in mean time is to use "eclairjs": "../../eclairjs/client" in package.json
// or leave USE_SAVED_DATA as unset environment variable. It is implemented in latest version
// of ElcairJS Server so server piece (and latest docker image) are ok.
var use_saved_data = process.env.USE_SAVED_DATA;

var use_saved_data = process.env.USE_SAVED_DATA || true;
var saved_data_path = process.env.SAVED_DATA || "/tmp";
var complete_ratings_data_path = saved_data_path +'/complete_ratings_data';
var predictionModleValuesDFPath = saved_data_path + '/predictionModleValuesDF';
Expand Down Expand Up @@ -306,7 +300,7 @@ function movie_recommender_init() {
var row = spark.sql.RowFactory.create([best_rank, iterations, regularization_parameter, blocks, seed]);
predictionModleValuesDF = sparkSession.createDataFrame([row], schema);
predictionModleValuesDF.take(1).then(function(result){
//console.log("predictionModleValuesDF result: ",result);
console.log("predictionModleValuesDF result: ",result);
predictionModleValuesDF.write().mode('overwrite').json(predictionModleValuesDFPath);
}, function(err){
console.log('err ' + err);
Expand Down
2 changes: 1 addition & 1 deletion sales_demo/package.json
Expand Up @@ -9,7 +9,7 @@
"express": "~4.13.1",
"morgan": "~1.6.1",
"serve-favicon": "~2.3.0",
"eclairjs": "^0.8",
"eclairjs": "^0.9",
"ws": "~1.0"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion wordcount_express/package.json
Expand Up @@ -5,7 +5,7 @@
"main": "app.js",
"dependencies": {
"express": "~4.14.0",
"eclairjs": "^0.8",
"eclairjs": "^0.9",
"pug": "*",
"ws": "*"
}
Expand Down

0 comments on commit 2846033

Please sign in to comment.