Skip to content

Commit 66fec20

Browse files
committed
Fixed bug that prevented passing hadoopConf to executors
1 parent ae913ce commit 66fec20

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!-- Reset the version numbers, too. -->
88
<groupId>org.diana-hep</groupId>
99
<artifactId>root4j</artifactId>
10-
<version>0.1.6</version>
10+
<version>0.1.7</version>
1111
<packaging>jar</packaging>
1212

1313
<name>root4j</name>

src/main/java/org/dianahep/root4j/RootFileReader.java

+9-8
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.util.List;
2525
import java.util.Iterator;
2626
import java.util.Map;
27+
import java.util.Properties;
2728

2829
// hadoop hdfs
2930
import org.apache.hadoop.conf.Configuration;
@@ -167,16 +168,16 @@ public RootFileReader(File file, RootFileReader shared) throws IOException
167168

168169
public RootFileReader(String path) throws IOException
169170
{
170-
/*
171-
FileSystem hdfs = FileSystem.get(hConf);
172-
Path hPathName = new Path(pathName);
173-
RootHDFSInputStream hdfsInput = new RootHDFSInputStream(hdfs.open(hPathName),
174-
this);
171+
//DO NOT USE THIS IMPLEMENTATION! - For compatibility only
172+
Configuration conf = new Configuration();
173+
Path hPath = new Path(path);
174+
FileSystem fs = hPath.getFileSystem(conf);
175+
RootHDFSInputStream hdfsInput = new RootHDFSInputStream(fs.open(hPath), this);
175176
init(hdfsInput, null);
176-
*/
177-
177+
}
178178

179-
Configuration conf = new Configuration();
179+
public RootFileReader(String path, Configuration conf) throws IOException
180+
{
180181
Path hPath = new Path(path);
181182
FileSystem fs = hPath.getFileSystem(conf);
182183
RootHDFSInputStream hdfsInput = new RootHDFSInputStream(fs.open(hPath), this);

0 commit comments

Comments
 (0)