Skip to content

Commit

Permalink
Do not set fileSystem globally to hdfs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Aug 10, 2017
1 parent c739f88 commit 54a2346
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Code/MRS/2-Train-Test.r
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ trainDS <- RxHiveData(table = "flightsweathertrain", colInfo = colInfoFull)
testDS <- RxHiveData(table = "flightsweathertest", colInfo = colInfoFull)

# save the test data as XDF
airWeatherTestXdf <- RxXdfData(file.path(dataDir, "airWeatherTestXdf"))
airWeatherTestXdf <- RxXdfData(file.path(dataDir, "airWeatherTestXdf"), fileSystem = hdfs)
rxDataStep(inData = testDS, outFile = airWeatherTestXdf, overwrite = TRUE)

################################################
Expand All @@ -67,7 +67,7 @@ save(logitModel, file = "logitModelSubset.RData")

# Predict over test data (Logistic Regression).

logitPredict <- RxXdfData(file.path(dataDir, "logitPredictSubset"))
logitPredict <- RxXdfData(file.path(dataDir, "logitPredictSubset"), fileSystem = hdfs)

# Use the scalable rxPredict() function

Expand Down Expand Up @@ -99,7 +99,7 @@ summary(fastTreesEnsembleModel)
save(fastTreesEnsembleModel, file = "fastTreesEnsembleModelSubset.RData")

# Test
fastTreesEnsemblePredict <- RxXdfData(file.path(dataDir, "fastTreesEnsemblePredictSubset"))
fastTreesEnsemblePredict <- RxXdfData(file.path(dataDir, "fastTreesEnsemblePredictSubset"), fileSystem = hdfs)

# Experimental feature to parallelize rxPredict when using a MicrosoftML model
assign("predictMethod", "useDataStep", envir = MicrosoftML:::rxHashEnv)
Expand Down
2 changes: 1 addition & 1 deletion Code/MRS/3-Deploy-Score.r
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rxSetComputeContext("local")
load("logitModelSubset.RData") # loads logitModel

# Reference the test data to be scored
airWeatherTestXdf <- RxXdfData( file.path(dataDir, "airWeatherTestXdf") )
airWeatherTestXdf <- RxXdfData(file.path(dataDir, "airWeatherTestXdf"), fileSystem = hdfs)

# Read the first 6 rows and remove the ArrDel15 column
dataToBeScored <- base::subset(head(airWeatherTestXdf), select = -ArrDel15)
Expand Down
2 changes: 1 addition & 1 deletion Code/MRS/SetComputeContext.r
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if(file.exists("/dsvm"))
# N.B. Can be used with local or RxSpark compute contexts
################################################

rxOptions(fileSystem = RxHdfsFileSystem())
hdfs <- RxHdfsFileSystem()

dataDir <- "/user/RevoShare/remoteuser/Data"

Expand Down

0 comments on commit 54a2346

Please sign in to comment.