public class ColumnList extends Object
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)
public ColumnList addColumn(byte[] family, byte[] qualifier, byte[] value)
public ColumnList addColumn(IColumn column)
IColumn
interface.public ColumnList addCounter(byte[] family, byte[] qualifier, long incr)
public ColumnList addCounter(ICounter counter)
ICounter
interface.public ColumnList deleteColumn(byte[] family, byte[] qualifier)
public boolean hasColumns()
public boolean hasColumnsToDelete()
public boolean hasCounters()
public List<ColumnList.Column> getColumns()
public ArrayList<ColumnList.Column> getColumnsToDelete()
public List<ColumnList.Counter> getCounters()
Copyright © 2023 The Apache Software Foundation. All rights reserved.