I have written below codes which is working earlier. But its stopped
working as I have received class not found exception etc. Is it a memory
problem as earlier we have only hdfs and mapreduce1 installed in the
cluster. Then we installed solr, zoopkeeper and flume.
FileSystem fs = FileSystem.get(conf);
String sharedConfPath = "/user/hdfs/conf";
DistributedCache.addFileToClassPath(new Path(sharedConfPath), conf, fs);
String sharedLibPath = "/user/hdfs/lib";
Path path = new Path(sharedLibPath);
FileStatus[] file_status = fs.listStatus(path);
for (FileStatus fileStatus : file_status) {
String jarPath = sharedLibPath + "/" + fileStatus.getPath().getName();
DistributedCache.addFileToClassPath(new Path(jarPath), conf, fs);
}
Please help me to resolved this problem.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].