public InstrumentedHDFSFileSystem() { super(SCHEME, new DistributedFileSystem()); } }
/** @deprecated */ public ChecksumDistributedFileSystem(InetSocketAddress namenode, Configuration conf) throws IOException { super( new DistributedFileSystem(namenode, conf) ); }
/** @deprecated */ public ChecksumDistributedFileSystem(InetSocketAddress namenode, Configuration conf) throws IOException { super( new DistributedFileSystem(namenode, conf) ); }
public ChecksumDistributedFileSystem() { super( new DistributedFileSystem() ); }
public ChecksumDistributedFileSystem() { super( new DistributedFileSystem() ); }
public InstrumentedHDFSFileSystem() { super(SCHEME, new DistributedFileSystem()); } }
public InstrumentedHDFSFileSystem() { super(SCHEME, new DistributedFileSystem()); } }
private static void hdfsInit() throws IOException { dfs = new DistributedFileSystem(); Configuration conf = new Configuration(); conf.set("hadoop.job.ugi", superuser + "," + supergroup); try { dfs.initialize(new URI(HDFS_URI), conf); } catch (URISyntaxException e) { log.error("DFS Initialization error", e); } }
@Override public FileSystem run() { try { FileSystem fs = new DistributedFileSystem(); fs.initialize(namenodeUri, mapperConf); return fs; } catch (IOException ioe) { throw new RuntimeException(ioe); } } });
import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URI; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DistributedFileSystem; DistributedFileSystem fileSystem = new DistributedFileSystem(); Configuration conf = new Configuration(); fileSystem.initialize(new URI("hdfs://namenode-host:54310"), conf); FSDataInputStream input = fileSystem.open(new Path("/path/to/file.csv")); System.out.println((new BufferedReader(new InputStreamReader(input))).readLine());
DistributedFileSystem dfs = new DistributedFileSystem(); dfs.initialize(new URI("URI to HDFS"), new Configuration()); Path path = new Path("/user/hadoop-user/bar.txt"); if (!dfs.exists(path)) dfs.createNewFile(path); FSDataOutputStream dos = dfs.create(path);
i++; InetSocketAddress addr = NetUtils.createSocketAddr(argv[i++]); fs = new DistributedFileSystem(addr, conf); } else if ("-local".equals(cmd)) { i++;
new DistributedFileSystem(); } else {
FileSystem fs2 = new DistributedFileSystem(); fs2.initialize(fs.getUri(), conf);
DistributedFileSystem fs2 = new DistributedFileSystem(); fs2.initialize(fs.getUri(), conf);
DistributedFileSystem dfs = new DistributedFileSystem(); try { dfs.initialize(