Java 类org.apache.hadoop.io.ArrayPrimitiveWritable 实例源码

项目:ytk-mp4j    文件:Server.java   
@Override
public ArrayPrimitiveWritable arrayAllReduce(ArrayPrimitiveWritable byteSerialArray, int rank) throws Mp4jException {
    try {
        byte[] obj = (byte[])byteSerialArray.get();
        allReduceByteArray.write(obj);
        barrier.await();
        if (rank == 0) {
            allReduceReturnArray = new ArrayPrimitiveWritable(allReduceByteArray.toByteArray());
            allReduceByteArray.reset();
        }
        barrier.await();
        return allReduceReturnArray;
    } catch (Exception e) {
        throw new Mp4jException("array allreduce exception!");
    }
}
项目:bigdata-fingerprint    文件:LocalStructureJiang.java   
@Override
public void readFields(DataInput in) throws IOException {

    super.readFields(in);

    ArrayPrimitiveWritable ow1 = new ArrayPrimitiveWritable(fvdist);
    ArrayPrimitiveWritable ow2 = new ArrayPrimitiveWritable(fvangle);

    ow1.readFields(in);
    ow2.readFields(in);
    minutia.readFields(in);

    fvdist = (float[]) ow1.get();
    fvangle = (byte[]) ow2.get();
}
项目:bigdata-fingerprint    文件:PartialScoreLSS.java   
public void readFields(DataInput in) throws IOException {

        templatesize = in.readInt();

        ArrayPrimitiveWritable auxaw = new ArrayPrimitiveWritable(bestsimilarities);
        auxaw.readFields(in);
        bestsimilarities = (float[]) auxaw.get();
    }
项目:bigdata-fingerprint    文件:LocalStructureCylinder.java   
@Override
public void write(DataOutput out) throws IOException {

    super.write(out);

    ArrayPrimitiveWritable ow = new ArrayPrimitiveWritable(cm_vector);

    ow.write(out);
    minutia.write(out);
    out.writeFloat(norm);
}
项目:oryx2    文件:ValueWritableConverterTest.java   
@Test(expected = IllegalArgumentException.class)
public void testNoSuchMethod() {
  new ValueWritableConverter<>(byte[].class, ArrayPrimitiveWritable.class);
}
项目:bigdata-fingerprint    文件:PartialScoreLSSImproved.java   
public void readFields(DataInput in) throws IOException {

        ArrayPrimitiveWritable auxaw = new ArrayPrimitiveWritable();
        auxaw.readFields(in);
        bestsimilarities = (float[]) auxaw.get();
    }
项目:bigdata-fingerprint    文件:PartialScoreLSSImproved.java   
public void write(DataOutput out) throws IOException {

        ArrayPrimitiveWritable auxaw = new ArrayPrimitiveWritable(bestsimilarities);
        auxaw.write(out);
    }
项目:bigdata-fingerprint    文件:LocalStructureJiang.java   
@Override
public void write(DataOutput out) throws IOException {

    super.write(out);

    ArrayPrimitiveWritable ow1 = new ArrayPrimitiveWritable(fvdist);
    ArrayPrimitiveWritable ow2 = new ArrayPrimitiveWritable(fvangle);

    ow1.write(out);
    ow2.write(out);
    minutia.write(out);

}
项目:bigdata-fingerprint    文件:PartialScoreLSS.java   
public void write(DataOutput out) throws IOException {

        out.writeInt(templatesize);

        ArrayPrimitiveWritable auxaw = new ArrayPrimitiveWritable(bestsimilarities);
        auxaw.write(out);
    }
项目:bigdata-fingerprint    文件:LocalStructureCylinder.java   
@Override
public void readFields(DataInput in) throws IOException {

    super.readFields(in);

    ArrayPrimitiveWritable ow = new ArrayPrimitiveWritable(cm_vector);

    ow.readFields(in);
    cm_vector = (float[]) ow.get();

    minutia.readFields(in);
    norm = in.readFloat();

}
项目:ytk-mp4j    文件:IServer.java   
public ArrayPrimitiveWritable primitiveArrayAllReduce(ArrayPrimitiveWritable arrayPrimitiveWritable, int rank) throws Mp4jException;
项目:ytk-mp4j    文件:IServer.java   
public ArrayPrimitiveWritable arrayAllReduce(ArrayPrimitiveWritable byteSerialArray, int rank) throws Mp4jException;