热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.hadoop.io.ByteWritable.()方法的使用及代码示例

本文整理了Java中org.apache.hadoop.io.ByteWritable.<init>()方法的一些代码示例,展示了ByteWri

本文整理了Java中org.apache.hadoop.io.ByteWritable.()方法的一些代码示例,展示了ByteWritable.()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteWritable.()方法的具体详情如下:
包路径:org.apache.hadoop.io.ByteWritable
类名称:ByteWritable
方法名:

ByteWritable.介绍

暂无

代码示例

代码示例来源:origin: elastic/elasticsearch-hadoop

@Override
protected Object processByte(Byte value) {
return new ByteWritable(value);
}

代码示例来源:origin: elastic/elasticsearch-hadoop

@Test
public void testByte() {
writableTypeToJson(new ByteWritable(Byte.MAX_VALUE));
}

代码示例来源:origin: elastic/elasticsearch-hadoop

return new ByteWritable((Byte) object);

代码示例来源:origin: apache/avro

@Test
public void testConvertByteWritable() {
AvroDatumConverter cOnverter= mFactory.create(ByteWritable.class);
assertEquals(42, converter.convert(new ByteWritable((byte) 42)).bytes()[0]);
}

代码示例来源:origin: rcongiu/Hive-JSON-Serde

@Override
public Object getPrimitiveWritableObject(Object o) {
if(o == null) return null;

if(o instanceof String) {
return new ByteWritable(ParsePrimitiveUtils.parseByte((String)o));
} else {
return new ByteWritable((Byte) o);
}
}

代码示例来源:origin: org.elasticsearch/elasticsearch-spark-13

@Override
protected Object processByte(Byte value) {
return new ByteWritable(value);
}

代码示例来源:origin: org.apache.giraph/giraph-core

@Override
public ByteWritable createMaxPositiveValue() {
return new ByteWritable(Byte.MAX_VALUE);
}

代码示例来源:origin: com.alibaba.blink/flink-table

@Override
protected WritableComparable convert(Object value) {
return new ByteWritable((byte) value);
}
}

代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop

@Override
protected Object processByte(Byte value) {
return new ByteWritable(value);
}

代码示例来源:origin: org.elasticsearch/elasticsearch-hadoop-mr

@Override
protected Object processByte(Byte value) {
return new ByteWritable(value);
}

代码示例来源:origin: org.apache.giraph/giraph-core

@Override
public ByteWritable create() {
return new ByteWritable();
}

代码示例来源:origin: org.apache.giraph/giraph-core

@Override
public ByteWritable createOne() {
return new ByteWritable((byte) 1);
}

代码示例来源:origin: org.apache.giraph/giraph-core

@Override
public ByteWritable createMinNegativeValue() {
return new ByteWritable(Byte.MIN_VALUE);
}

代码示例来源:origin: org.apache.giraph/giraph-core

@Override
public ByteWritable createCopy(ByteWritable from) {
return new ByteWritable(from.get());
}

代码示例来源:origin: org.apache.hadoop/hadoop-streaming

public ByteWritable readByte(ByteWritable bw) throws IOException {
if (bw == null) {
bw = new ByteWritable();
}
bw.set(in.readByte());
return bw;
}

代码示例来源:origin: org.apache.camel/camel-hdfs2

@Override
public Writable create(Object value, TypeConverter typeConverter, Holder size) {
size.value = SIZE;
ByteWritable writable = new ByteWritable();
writable.set(typeConverter.convertTo(Byte.class, value));
return writable;
}

代码示例来源:origin: ch.cern.hadoop/hadoop-streaming

public ByteWritable readByte(ByteWritable bw) throws IOException {
if (bw == null) {
bw = new ByteWritable();
}
bw.set(in.readByte());
return bw;
}

代码示例来源:origin: ZuInnoTe/hadoopcryptoledger

public TestBitcoinTransaction(byte marker, byte flag, int version, byte[] inCounter, List listOfInputs, byte[] outCounter, List listOfOutputs, List listOfScriptWitnessItem,int lockTime) {
this.marker=new ByteWritable(marker);
this.flag=new ByteWritable(flag);
this.version=new IntWritable(version);
this.inCounter=new BytesWritable(inCounter);
this.listOfInputs=listOfInputs;
this.outCounter=new BytesWritable(outCounter);
this.listOfOutputs=listOfOutputs;
this.listOfScriptWitnessItem=listOfScriptWitnessItem;
this.lockTime=new IntWritable(lockTime);
}

代码示例来源:origin: ZuInnoTe/hadoopcryptoledger

public TestBitcoinTransaction(int version, byte[] inCounter, List listOfInputs, byte[] outCounter, List listOfOutputs, int lockTime) {
this.marker=new ByteWritable((byte) 0x01);
this.flag=new ByteWritable((byte) 0x00);
this.version=new IntWritable(version);
this.inCounter=new BytesWritable(inCounter);
this.listOfInputs=listOfInputs;
this.outCounter=new BytesWritable(outCounter);
this.listOfOutputs=listOfOutputs;
this.listOfScriptWitnessItem=new ArrayList();
this.lockTime=new IntWritable(lockTime);
}

代码示例来源:origin: ZuInnoTe/hadoopcryptoledger

public TestBitcoinTransaction() {
this.marker=new ByteWritable((byte) 0x01);
this.flag=new ByteWritable((byte) 0x00);
this.version=new IntWritable(0);
this.inCounter=new BytesWritable(new byte[0]);
this.outCounter=new BytesWritable(new byte[0]);
this.listOfInputs=new ArrayList();
this.listOfOutputs=new ArrayList();
this.listOfScriptWitnessItem=new ArrayList();
this.lockTime=new IntWritable(0);
}

推荐阅读
author-avatar
mobiledu2502912527
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有