All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.flipkart.hbaseobjectmapper.HBColumn Maven / Gradle / Ivy

Go to download

HBase ORM is a light-weight, thread-safe and performant library that enables: [1] object-oriented access of HBase rows (Data Access Object) with minimal code and good testability. [2] reading from and/or writing to HBase tables in Hadoop MapReduce jobs. This can also be used as an ORM for Bigtable.

The newest version!
package com.flipkart.hbaseobjectmapper;

import com.flipkart.hbaseobjectmapper.codec.Codec;

import java.io.Serializable;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import java.lang.reflect.Type;
import java.util.Map;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Maps an entity field to an HBase column
 */
@Target(FIELD)
@Retention(RUNTIME)
public @interface HBColumn {

    /**
     * Name of HBase column family
     *
     * @return Name of HBase column family
     */
    String family();

    /**
     * Name of HBase column
     *
     * @return Name of HBase column
     */
    String column();

    /**
     * [optional] flags to be passed to codec's {@link Codec#serialize(Serializable, Map) serialize} and {@link Codec#deserialize(byte[], Type, Map) deserialize} methods
     * 

* Note: These flags will be passed as a Map<String, String> (param name and param value) * * @return Flags */ Flag[] codecFlags() default {}; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy