ml.shifu.guagua.mapreduce
类 GuaguaWritableSerializer<RESULT extends ml.shifu.guagua.io.Bytable>
java.lang.Object
ml.shifu.guagua.io.BytableSerializer<RESULT>
ml.shifu.guagua.mapreduce.GuaguaWritableSerializer<RESULT>
- 所有已实现的接口:
- ml.shifu.guagua.io.Serializer<RESULT>
public class GuaguaWritableSerializer<RESULT extends ml.shifu.guagua.io.Bytable>
- extends ml.shifu.guagua.io.BytableSerializer<RESULT>
GuaguaWritableSerializer is to provide the functionality to support use hadoop writable interface.
By using this, one should set result class name to Writable, not Bytable like this:
conf.set(GuaguaConstants.GUAGUA_RESULT_CLASS, LongWritable.class.getName());
| 从类 ml.shifu.guagua.io.BytableSerializer 继承的方法 |
objectToBytes |
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GuaguaWritableSerializer
public GuaguaWritableSerializer()
bytesToObject
public RESULT bytesToObject(byte[] data,
String className)
- De-serialize from bytes to object. One should provide the instance before de-serializing the object.
- 指定者:
- 接口
ml.shifu.guagua.io.Serializer<RESULT extends ml.shifu.guagua.io.Bytable> 中的 bytesToObject - 覆盖:
- 类
ml.shifu.guagua.io.BytableSerializer<RESULT extends ml.shifu.guagua.io.Bytable> 中的 bytesToObject
- 抛出:
NullPointerException - if className or data is null.
ml.shifu.guagua.GuaguaRuntimeException - if any IO exception or other reflection exception.
Copyright © 2014. All Rights Reserved.