public class ColumnList extends Object
Represents a list of HBase columns.
There are two types of columns, standard and counter.
Standard columns have column family (required), qualifier (optional), timestamp (optional), and a value (optional) values.
Counter columns have column family (required), qualifier (optional), and an increment (optional, but recommended) values.
Inserts/Updates can be added via the addColumn()
and addCounter()
methods.
Modifier and Type | Class and Description |
---|---|
static class |
ColumnList.AbstractColumn |
static class |
ColumnList.Column |
static class |
ColumnList.Counter |
Constructor and Description |
---|
ColumnList() |
Modifier and Type | Method and Description |
---|---|
ColumnList |
addColumn(byte[] family,
byte[] qualifier,
byte[] value)
Add a standard HBase column.
|
ColumnList |
addColumn(byte[] family,
byte[] qualifier,
long ts,
byte[] value)
Add a standard HBase column.
|
ColumnList |
addColumn(IColumn column)
Add a standard HBase column given an instance of a class that implements the
IColumn interface. |
ColumnList |
addCounter(byte[] family,
byte[] qualifier,
long incr)
Add an HBase counter column.
|
ColumnList |
addCounter(ICounter counter)
Add an HBase counter column given an instance of a class that implements the
ICounter interface. |
ColumnList |
deleteColumn(byte[] family,
byte[] qualifier)
Remove a standard HBase column.
|
List<ColumnList.Column> |
getColumns()
Get the list of column definitions.
|
ArrayList<ColumnList.Column> |
getColumnsToDelete()
Get the list of ‘column to delete’ definitions.
|
List<ColumnList.Counter> |
getCounters()
Get the list of counter definitions.
|
boolean |
hasColumns()
Query to determine if we have column definitions.
|
boolean |
hasColumnsToDelete()
Query to determine if we have column delete definitions.
|
boolean |
hasCounters()
Query to determine if we have counter definitions.
|
public ColumnList addColumn(byte[] family, byte[] qualifier, long ts, byte[] value)
Add a standard HBase column.
public ColumnList addColumn(byte[] family, byte[] qualifier, byte[] value)
Add a standard HBase column.
public ColumnList addColumn(IColumn column)
Add a standard HBase column given an instance of a class that implements the IColumn
interface.
public ColumnList addCounter(byte[] family, byte[] qualifier, long incr)
Add an HBase counter column.
public ColumnList addCounter(ICounter counter)
Add an HBase counter column given an instance of a class that implements the ICounter
interface.
public ColumnList deleteColumn(byte[] family, byte[] qualifier)
Remove a standard HBase column.
public boolean hasColumns()
Query to determine if we have column definitions.
public boolean hasColumnsToDelete()
Query to determine if we have column delete definitions.
public boolean hasCounters()
Query to determine if we have counter definitions.
public List<ColumnList.Column> getColumns()
Get the list of column definitions.
public ArrayList<ColumnList.Column> getColumnsToDelete()
Get the list of ‘column to delete’ definitions.
public List<ColumnList.Counter> getCounters()
Get the list of counter definitions.
Copyright © 2019 The Apache Software Foundation. All rights reserved.