本文整理了Java中org.apache.hadoop.net.NodeBase.getNetworkLocation()
方法的一些代码示例,展示了NodeBase.getNetworkLocation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NodeBase.getNetworkLocation()
方法的具体详情如下:
包路径:org.apache.hadoop.net.NodeBase
类名称:NodeBase
方法名:getNetworkLocation
[英]Return this node's network location
[中]返回此节点的网络位置
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core
OneBlockInfo(Path path, long offset, long len,
String[] hosts, String[] topologyPaths) {
this.Onepath= path;
this.offset = offset;
this.hosts = hosts;
this.length = len;
assert (hosts.length == topologyPaths.length ||
topologyPaths.length == 0);
// if the file system does not have any rack information, then
// use dummy rack location.
if (topologyPaths.length == 0) {
topologyPaths = new String[hosts.length];
for (int i = 0; i
NetworkTopology.DEFAULT_RACK)).toString();
}
}
// The topology paths have the host name included as the last
// component. Strip it.
this.racks = new String[topologyPaths.length];
for (int i = 0; i
}
}
}
代码示例来源:origin: org.apache.hama/hama-core
OneBlockInfo(Path path, long offset, long len, String[] hosts,
String[] pTopologyPaths) {
String[] topologyPaths = pTopologyPaths;
this.Onepath= path;
this.offset = offset;
this.hosts = hosts;
this.length = len;
assert (hosts.length == topologyPaths.length || topologyPaths.length == 0);
// if the file ystem does not have any rack information, then
// use dummy rack location.
if (topologyPaths.length == 0) {
topologyPaths = new String[hosts.length];
for (int i = 0; i
NetworkTopology.DEFAULT_RACK)).toString();
}
}
// The topology paths have the host name included as the last
// component. Strip it.
this.racks = new String[topologyPaths.length];
for (int i = 0; i
}
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
OneBlockInfo(Path path, long offset, long len,
String[] hosts, String[] topologyPaths) {
this.Onepath= path;
this.offset = offset;
this.hosts = hosts;
this.length = len;
assert (hosts.length == topologyPaths.length ||
topologyPaths.length == 0);
// if the file system does not have any rack information, then
// use dummy rack location.
if (topologyPaths.length == 0) {
topologyPaths = new String[hosts.length];
for (int i = 0; i
NetworkTopology.DEFAULT_RACK)).toString();
}
}
// The topology paths have the host name included as the last
// component. Strip it.
this.racks = new String[topologyPaths.length];
for (int i = 0; i
}
}
}
代码示例来源:origin: apache/hama
OneBlockInfo(Path path, long offset, long len, String[] hosts,
String[] pTopologyPaths) {
String[] topologyPaths = pTopologyPaths;
this.Onepath= path;
this.offset = offset;
this.hosts = hosts;
this.length = len;
assert (hosts.length == topologyPaths.length || topologyPaths.length == 0);
// if the file ystem does not have any rack information, then
// use dummy rack location.
if (topologyPaths.length == 0) {
topologyPaths = new String[hosts.length];
for (int i = 0; i
NetworkTopology.DEFAULT_RACK)).toString();
}
}
// The topology paths have the host name included as the last
// component. Strip it.
this.racks = new String[topologyPaths.length];
for (int i = 0; i
}
}
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-core
OneBlockInfo(Path path, long offset, long len,
String[] hosts, String[] topologyPaths) {
this.Onepath= path;
this.offset = offset;
this.hosts = hosts;
this.length = len;
assert (hosts.length == topologyPaths.length ||
topologyPaths.length == 0);
// if the file system does not have any rack information, then
// use dummy rack location.
if (topologyPaths.length == 0) {
topologyPaths = new String[hosts.length];
for (int i = 0; i
NetworkTopology.DEFAULT_RACK)).toString();
}
}
// The topology paths have the host name included as the last
// component. Strip it.
this.racks = new String[topologyPaths.length];
for (int i = 0; i
}
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core
OneBlockInfo(Path path, long offset, long len,
String[] hosts, String[] topologyPaths) {
this.Onepath= path;
this.offset = offset;
this.hosts = hosts;
this.length = len;
assert (hosts.length == topologyPaths.length ||
topologyPaths.length == 0);
// if the file system does not have any rack information, then
// use dummy rack location.
if (topologyPaths.length == 0) {
topologyPaths = new String[hosts.length];
for (int i = 0; i
NetworkTopology.DEFAULT_RACK)).toString();
}
}
// The topology paths have the host name included as the last
// component. Strip it.
this.racks = new String[topologyPaths.length];
for (int i = 0; i
}
}
}
代码示例来源:origin: com.moz.fiji.mapreduce/fiji-mapreduce
OneBlockInfo(Path path, long offset, long len,
String[] hosts, String[] topologyPaths) {
this.Onepath= path;
this.offset = offset;
this.hosts = hosts;
this.length = len;
assert (hosts.length == topologyPaths.length ||
topologyPaths.length == 0);
// if the file system does not have any rack information, then
// use dummy rack location.
if (topologyPaths.length == 0) {
topologyPaths = new String[hosts.length];
for (int i = 0; i
NetworkTopology.DEFAULT_RACK)).toString();
}
}
// The topology paths have the host name included as the last
// component. Strip it.
this.racks = new String[topologyPaths.length];
for (int i = 0; i
}
}
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
OneBlockInfo(Path path, long offset, long len,
String[] hosts, String[] topologyPaths) {
this.Onepath= path;
this.offset = offset;
this.hosts = hosts;
this.length = len;
assert (hosts.length == topologyPaths.length ||
topologyPaths.length == 0);
// if the file ystem does not have any rack information, then
// use dummy rack location.
if (topologyPaths.length == 0) {
topologyPaths = new String[hosts.length];
for (int i = 0; i
toString();
}
}
// The topology paths have the host name included as the last
// component. Strip it.
this.racks = new String[topologyPaths.length];
for (int i = 0; i
}
}
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
OneBlockInfo(Path path, long offset, long len,
String[] hosts, String[] topologyPaths) {
this.Onepath= path;
this.offset = offset;
this.hosts = hosts;
this.length = len;
assert (hosts.length == topologyPaths.length ||
topologyPaths.length == 0);
// if the file system does not have any rack information, then
// use dummy rack location.
if (topologyPaths.length == 0) {
topologyPaths = new String[hosts.length];
for (int i = 0; i
NetworkTopology.DEFAULT_RACK)).toString();
}
}
// The topology paths have the host name included as the last
// component. Strip it.
this.racks = new String[topologyPaths.length];
for (int i = 0; i
}
}
}
代码示例来源:origin: twitter/hraven
OneBlockInfo(Path path, long offset, long len,
String[] hosts, String[] topologyPaths) {
this.Onepath= path;
this.offset = offset;
this.hosts = hosts;
this.length = len;
assert (hosts.length == topologyPaths.length ||
topologyPaths.length == 0);
// if the file system does not have any rack information, then
// use dummy rack location.
if (topologyPaths.length == 0) {
topologyPaths = new String[hosts.length];
for (int i = 0; i
NetworkTopology.DEFAULT_RACK)).toString();
}
}
// The topology paths have the host name included as the last
// component. Strip it.
this.racks = new String[topologyPaths.length];
for (int i = 0; i
}
}
}
代码示例来源:origin: LiveRamp/cascading_ext
OneBlockInfo(Path path, long offset, long len,
String[] hosts, String[] topologyPaths) {
this.Onepath= path;
this.offset = offset;
this.hosts = hosts;
this.length = len;
assert (hosts.length == topologyPaths.length ||
topologyPaths.length == 0);
// if the file system does not have any rack information, then
// use dummy rack location.
if (topologyPaths.length == 0) {
topologyPaths = new String[hosts.length];
for (int i = 0; i
NetworkTopology.DEFAULT_RACK)).toString();
}
}
// The topology paths have the host name included as the last
// component. Strip it.
this.racks = new String[topologyPaths.length];
for (int i = 0; i
}
}
}