本文整理汇总了Java中org.apache.hadoop.io.IntWritable.readFields方法的典型用法代码示例。如果您正苦于以下问题:Java IntWritable.readFields方法的具体用法?Java IntWritable.readFields怎么用?Java IntWritable.readFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.io.IntWritable
的用法示例。
在下文中一共展示了IntWritable.readFields方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFields
import org.apache.hadoop.io.IntWritable; //导入方法依赖的package包/类
public void readFields(DataInput dataInput) throws IOException {
Text text = new Text();
text.readFields(dataInput);
Logger.println("value wrapper read class:"+text.toString());
String className = text.toString();
if (className.equals(IntWritable.class.getSimpleName())) {
value = new IntWritable();
} else if (className.equals(NewOldCustomElement.class.getSimpleName())) {
value = new NewOldCustomElement();
} else if (className.equals(CustomerFlowElement.class.getSimpleName())) {
value = new CustomerFlowElement();
} else {
throw new IOException("can not read fields "+className);
}
value.readFields(dataInput);
}
示例2: readFields
import org.apache.hadoop.io.IntWritable; //导入方法依赖的package包/类
public void readFields(DataInput dataInput) throws IOException {
Text text = new Text();
text.readFields(dataInput);
wifiProb = text.toString();
IntWritable intReader = new IntWritable();
intReader.readFields(dataInput);
inNoOutWifi = intReader.get();
intReader.readFields(dataInput);
inNoOutStore = intReader.get();
intReader.readFields(dataInput);
outNoInWifi = intReader.get();
intReader.readFields(dataInput);
outNoInStore = intReader.get();
intReader.readFields(dataInput);
inAndOutWifi = intReader.get();
intReader.readFields(dataInput);
inAndOutStore = intReader.get();
intReader.readFields(dataInput);
stayInWifi = intReader.get();
intReader.readFields(dataInput);
stayInStore = intReader.get();
DoubleWritable doubleWritable = new DoubleWritable();
doubleWritable.readFields(dataInput);
jumpRate = doubleWritable.get();
doubleWritable.readFields(dataInput);
deepVisit = doubleWritable.get();
doubleWritable.readFields(dataInput);
inStoreRate = doubleWritable.get();
}
示例3: readInt
import org.apache.hadoop.io.IntWritable; //导入方法依赖的package包/类
/** read the int value */
static int readInt(DataInput in) throws IOException {
IntWritable uInt = TL_DATA.get().U_INT;
uInt.readFields(in);
return uInt.get();
}
示例4: readInt
import org.apache.hadoop.io.IntWritable; //导入方法依赖的package包/类
private int readInt() throws IOException {
dis.readInt(); // ignore (we know it's 4)
IntWritable iw = new IntWritable();
iw.readFields(dis);
return iw.get();
}