class HbaseSerializer extends BinarySerializer {

    private static final Logger LOG = Log.logger(HbaseSerializer.class);
    private final short vertexLogicPartitions;
    private final short edgeLogicPartitions;

    public HbaseSerializer(HugeConfig config) {
        super(false, true, config.get(HbaseOptions.HBASE_ENABLE_PARTITION));
        this.vertexLogicPartitions = config.get(HbaseOptions.HBASE_VERTEX_PARTITION).shortValue();
        this.edgeLogicPartitions = config.get(HbaseOptions.HBASE_EDGE_PARTITION).shortValue();
        LOG.debug("vertexLogicPartitions: " + vertexLogicPartitions);
    }

    @Override
    protected short getPartition(HugeType type, Id id) {<FILL_FUNCTION_BODY>}
}

        int hashcode = Arrays.hashCode(id.asBytes());
        short partition = 1;
        if (type.isEdge()) {
            partition = (short) (hashcode % this.edgeLogicPartitions);
        } else if (type.isVertex()) {
            partition = (short) (hashcode % this.vertexLogicPartitions);
        }
        return partition > 0 ? partition : (short) -partition;
    
<methods>public void <init>() ,public void <init>(HugeConfig) ,public void <init>(boolean, boolean, boolean) ,public static void increaseOne(byte[]) ,public org.apache.hugegraph.backend.store.BackendEntry parse(org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.structure.HugeEdge readEdge(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.schema.EdgeLabel readEdgeLabel(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.structure.HugeIndex readIndex(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.query.ConditionQuery, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.schema.IndexLabel readIndexLabel(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.schema.PropertyKey readPropertyKey(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.structure.HugeVertex readVertex(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.schema.VertexLabel readVertexLabel(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.store.BackendEntry) ,public org.apache.hugegraph.backend.store.BackendEntry writeEdge(org.apache.hugegraph.structure.HugeEdge) ,public org.apache.hugegraph.backend.store.BackendEntry writeEdgeLabel(org.apache.hugegraph.schema.EdgeLabel) ,public org.apache.hugegraph.backend.store.BackendEntry writeEdgeProperty(HugeEdgeProperty<?>) ,public org.apache.hugegraph.backend.store.BackendEntry writeId(org.apache.hugegraph.type.HugeType, org.apache.hugegraph.backend.id.Id) ,public org.apache.hugegraph.backend.store.BackendEntry writeIndex(org.apache.hugegraph.structure.HugeIndex) ,public org.apache.hugegraph.backend.store.BackendEntry writeIndexLabel(org.apache.hugegraph.schema.IndexLabel) ,public org.apache.hugegraph.backend.store.BackendEntry writeOlapVertex(org.apache.hugegraph.structure.HugeVertex) ,public org.apache.hugegraph.backend.store.BackendEntry writePropertyKey(org.apache.hugegraph.schema.PropertyKey) ,public org.apache.hugegraph.backend.store.BackendEntry writeVertex(org.apache.hugegraph.structure.HugeVertex) ,public org.apache.hugegraph.backend.store.BackendEntry writeVertexLabel(org.apache.hugegraph.schema.VertexLabel) ,public org.apache.hugegraph.backend.store.BackendEntry writeVertexProperty(HugeVertexProperty<?>) <variables>private final non-sealed boolean enablePartition,private final non-sealed boolean indexWithIdPrefix,private final non-sealed boolean keyWithIdPrefix