AnsweredAssumed Answered

How to dynamically access a cluster with Java API

Question asked by boucherj on Jul 28, 2017
Latest reply on Aug 7, 2017 by cathy

Hello,

 

Here's some sample code we have to create a directory in MapR:

Configuration hadoopConfiguration = new Configuration()
FileSystem fileSystem = FileSystem.get(hadoopConfiguration)
Path testPath = new Path("/ABC/jsondb/newdir")
fileSystem.mkdirs(testPath)

This code is running on a standalone server with a MapR client installed and configured to point to a MapR sandbox VM.  Running this code will create the directory on the demo sandbox cluster

 

Is there a way to dynamically specify the cluster we want to use at runtime?  For example we would want to invoke some code to create a directory on cluster A, and on cluster B.

 

Thanks

Outcomes