Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Pragalbh Garg committed Mar 24, 2015
1 parent 4684775 commit 1f2c281
Show file tree
Hide file tree
Showing 22 changed files with 1,194 additions and 800 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import java.io.IOException;
import java.util.List;
import java.util.Map;

import org.apache.hadoop.hbase.client.Table;
import org.apache.hadoop.hbase.filter.Filter;
Expand All @@ -28,26 +29,25 @@
*/
public interface Reader
{

/**
* Load data.
* Scan row keys.
*
* @param hTable
* the h table
* @param columnFamily
* the column family
* @param rowKey
* the row key
* @param filter
* the filter
* @param columns
* the columns
* @return the list
* @param columnFamilyName
* the column family name
* @param columnName
* the column name
* @param rowKeyClazz
* the row key clazz
* @return the object[]
* @throws IOException
* Signals that an I/O exception has occurred.
*/
List<HBaseDataWrapper> LoadData(Table hTable, String columnFamily, Object rowKey, Filter filter, String... columns)
throws IOException;
Object[] scanRowKeys(final Table hTable, final Filter filter, final String columnFamilyName,
final String columnName, final Class rowKeyClazz) throws IOException;

/**
* Load data.
Expand All @@ -56,57 +56,20 @@ List<HBaseDataWrapper> LoadData(Table hTable, String columnFamily, Object rowKey
* the h table
* @param rowKey
* the row key
* @param filter
* the filter
* @param columns
* the columns
* @return the list
* @throws IOException
* Signals that an I/O exception has occurred.
*/
List<HBaseDataWrapper> LoadData(Table hTable, Object rowKey, Filter filter, String... columns) throws IOException;

/**
* Load all.
*
* @param hTable
* the h table
* @param filter
* the filter
* @param startRow
* the start row
* @param endRow
* the end row
* @param columnFamily
* the column family
* @param qualifier
* the qualifier
* @param columns
* the columns
* @return the list
* @throws IOException
* Signals that an I/O exception has occurred.
*/
List<HBaseDataWrapper> loadAll(Table hTable, Filter filter, byte[] startRow, byte[] endRow, String columnFamily,
String qualifier, String[] columns) throws IOException;

/**
* Scan row keys.
*
* @param hTable
* the h table
* @param filter
* the filter
* @param columnFamilyName
* the column family name
* @param columnName
* the column name
* @param rowKeyClazz
* the row key clazz
* @return the object[]
* @param outputColumns
* the output columns
* @return the list
* @throws IOException
* Signals that an I/O exception has occurred.
*/
Object[] scanRowKeys(final Table hTable, final Filter filter, final String columnFamilyName,
final String columnName, final Class rowKeyClazz) throws IOException;
List<HBaseDataWrapper> loadData(Table hTable, Object rowKey, byte[] startRow, byte[] endRow, String columnFamily,
Filter filter, List<Map<String, Object>> outputColumns) throws IOException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*/
public interface Writer
{

/**
* Writes columns data to HBase table, supplied as a map in Key/ value pair;
* key and value representing column name and value respectively.
Expand All @@ -39,6 +40,8 @@ public interface Writer
* the row key
* @param columns
* the columns
* @param columnFamilyName
* the column family name
* @throws IOException
* Signals that an I/O exception has occurred.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,54 @@ public interface DataHandler
*/
void createTableIfDoesNotExist(String tableName, String... colFamily) throws IOException;

// /**
// * Read data.
// *
// * @param tableName
// * the table name
// * @param clazz
// * the clazz
// * @param m
// * the m
// * @param rowKey
// * the row key
// * @param relatationNames
// * the relatation names
// * @param f
// * the f
// * @param colToOutput
// * the col to output
// * @return the list
// * @throws IOException
// * Signals that an I/O exception has occurred.
// */
// List readData(String tableName, Class clazz, EntityMetadata m, Object
// rowKey, List<String> relatationNames,
// FilterList f, List<Map<String, Object>> colToOutput) throws IOException;

/**
* Read data.
*
* @param tableName
* the table name
* @param clazz
* the clazz
* @param m
* the m
* @param rowKey
* the row key
* @param relatationNames
* the relatation names
* @param f
* the f
* @param colToOutput
* the col to output
* @param startRow
* the start row
* @param endRow
* the end row
* @param columnsToOutput
* the columns to output
* @param filterList
* the filter list
* @return the list
* @throws IOException
* Signals that an I/O exception has occurred.
*/
List readData(String tableName, Class clazz, EntityMetadata m, Object rowKey, List<String> relatationNames,
FilterList f, List<Map<String, Object>> colToOutput) throws IOException;
List readData(String tableName, EntityMetadata m, final Object rowKey, byte[] startRow, byte[] endRow,
List<Map<String, Object>> columnsToOutput, FilterList filterList) throws IOException;

/**
* Read all.
Expand All @@ -92,29 +117,30 @@ List readData(String tableName, Class clazz, EntityMetadata m, Object rowKey, Li
List readAll(String tableName, Class clazz, EntityMetadata m, List<Object> rowKeys, List<String> relatationNames,
String... columns) throws IOException;

/**
* Read data by range.
*
* @param tableName
* the table name
* @param clazz
* the clazz
* @param m
* the m
* @param startRow
* the start row
* @param endRow
* the end row
* @param colToOutput
* the col to output
* @param f
* the f
* @return the list
* @throws IOException
* Signals that an I/O exception has occurred.
*/
List readDataByRange(String tableName, Class clazz, EntityMetadata m, byte[] startRow, byte[] endRow,
List<Map<String, Object>> colToOutput, FilterList f) throws IOException;
// /**
// * Read data by range.
// *
// * @param tableName
// * the table name
// * @param clazz
// * the clazz
// * @param m
// * the m
// * @param startRow
// * the start row
// * @param endRow
// * the end row
// * @param colToOutput
// * the col to output
// * @param f
// * the f
// * @return the list
// * @throws IOException
// * Signals that an I/O exception has occurred.
// */
// List readDataByRange(String tableName, Class clazz, EntityMetadata m,
// byte[] startRow, byte[] endRow,
// List<Map<String, Object>> colToOutput, FilterList f) throws IOException;

/**
* Write data.
Expand Down
Loading

0 comments on commit 1f2c281

Please sign in to comment.