I need to read the .properties file, which is available in hdf. I use the code below, but it throws a runtime error.
FileSystem fs = FileSystem.get(config); Properties conf = wc.createConfiguration(); Properties prop = new Properties(); String appPath = "hdfs://clusterdb05.com:8020/user/cmahajan/" + version + "/apps/apps/"; conf.setProperty(OozieClient.APP_PATH,appPath); FileInputStream f = new FileInputStream("hdfs://clusterdb05.com:8020/user/cmahajan/app.properties"); ObjectInputStream f = new ObjectInputStream(fs.open(new Path("/user/cmahajan/app.properties")));
runtime error:
LaunchJob.java:28: cannot find symbol symbol : class ObjectInputStream location: class LaunchJob ObjectInputStream f = new ObjectInputStream(fs.open(new Path("/user/cmahajan/app.properties"))); ^ LaunchJob.java:28: cannot find symbol symbol : class ObjectInputStream location: class LaunchJob ObjectInputStream f = new ObjectInputStream(fs.open(new Path("/user/cmahajan/app.properties")));
source share