diff --git a/apidocs b/apidocs index 13ee069948..adbf499b9f 120000 --- a/apidocs +++ b/apidocs @@ -1 +1 @@ -releases/1.17.0/apidocs \ No newline at end of file +releases/1.17.1/apidocs \ No newline at end of file diff --git a/cpp-client-api b/cpp-client-api index c03b899e4a..37b47f6e7c 120000 --- a/cpp-client-api +++ b/cpp-client-api @@ -1 +1 @@ -releases/1.17.0/cpp-client-api \ No newline at end of file +releases/1.17.1/cpp-client-api \ No newline at end of file diff --git a/docs b/docs index 89743874ec..1924cb51ea 120000 --- a/docs +++ b/docs @@ -1 +1 @@ -releases/1.17.0/docs \ No newline at end of file +releases/1.17.1/docs \ No newline at end of file diff --git a/releases/1.17.1/apidocs/allclasses-frame.html b/releases/1.17.1/apidocs/allclasses-frame.html new file mode 100644 index 0000000000..c4449d3fb1 --- /dev/null +++ b/releases/1.17.1/apidocs/allclasses-frame.html @@ -0,0 +1,102 @@ + + + +
+ +Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final long |
+DEFAULT_KEEP_ALIVE_PERIOD_MS |
+15000L |
+
+
+public static final long |
+DEFAULT_NEGOTIATION_TIMEOUT_MS |
+10000L |
+
+
+public static final long |
+DEFAULT_OPERATION_TIMEOUT_MS |
+30000L |
+
+
+public static final long |
+INVALID_TXN_ID |
+-1L |
+
+
+public static final int |
+NO_SOFT_DELETED_STATE_RESERVED_SECONDS |
+0 |
+
+
+public static final long |
+NO_TIMESTAMP |
+-1L |
+
+
+public static final int |
+SLEEP_TIME |
+500 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final long |
+NO_TIMESTAMP |
+-1L |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+protected static final int |
+INDEX_RESET_LOCATION |
+-1 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final String |
+COLUMN_CLIENT |
+"client" |
+
+
+public static final int |
+COLUMN_CLIENT_IDX |
+5 |
+
+
+public static final String |
+COLUMN_KEY_ONE |
+"key1" |
+
+
+public static final int |
+COLUMN_KEY_ONE_IDX |
+0 |
+
+
+public static final String |
+COLUMN_KEY_TWO |
+"key2" |
+
+
+public static final int |
+COLUMN_KEY_TWO_IDX |
+1 |
+
+
+public static final String |
+COLUMN_PREV_ONE |
+"prev1" |
+
+
+public static final int |
+COLUMN_PREV_ONE_IDX |
+2 |
+
+
+public static final String |
+COLUMN_PREV_TWO |
+"prev2" |
+
+
+public static final int |
+COLUMN_PREV_TWO_IDX |
+3 |
+
+
+public static final String |
+COLUMN_ROW_ID |
+"row_id" |
+
+
+public static final int |
+COLUMN_ROW_ID_IDX |
+4 |
+
+
+public static final String |
+COLUMN_UPDATE_COUNT |
+"update_count" |
+
+
+public static final int |
+COLUMN_UPDATE_COUNT_IDX |
+6 |
+
+
+public static final String |
+DEFAULT_HEADS_TABLE_NAME |
+"default.IntegrationTestBigLinkedListHeads" |
+
+
+public static final String |
+DEFAULT_TABLE_NAME |
+"default.IntegrationTestBigLinkedList" |
+
+
+public static final String |
+HEADS_TABLE_NAME_KEY |
+"IntegrationTestBigLinkedList.heads_table" |
+
+
+public static final String |
+TABLE_NAME_KEY |
+"IntegrationTestBigLinkedList.table" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final int |
+DEFAULT_SLEEP |
+50000 |
+
Class and Description | +
---|
org.apache.kudu.client.ColumnRangePredicate
+ use the
+KuduPredicate class instead. |
+
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+Operation
to Kudu as part of this session.KuduScanToken
APIKuduScanToken
APIAsyncKuduScanner
.AsyncKuduSession
belongs to a specific AsyncKuduClient
, and represents a
+ context in which all write data access should take place.ColumnSchema
.ColumnSchema
.AsyncKuduScanner
using the passed configurations.KuduPartitioner
using the passed configurations.KuduScanner
using the passed configurations.ColumnSchema
for auto-incrementing column with passed parameters.ColumnSchema
for auto-incrementing column with passed parameters.ColumnSchema
using the passed parameters.ColumnSchema
using the passed parameters.ColumnTypeAttributes
using the passed parameters.ColumnTypeAttributes
using the passed parameters.KuduPartitioner
.Murmur2
and false positive rate is 0.01.Murmur2
.Murmur2
and false positive rate is 0.01.Murmur2
.AsyncKuduClient.shutdown()
and waits.KuduClient.shutdown()
.KuduSession.flush()
) and closes the sessions.KuduPredicate
class instead.KuduPredicate
into a byte array.KuduScanToken
into a KuduScanner
.KuduScanToken
into a KuduScanner.KuduScannerBuilder
.null
if the Hive Metastore integration is not enabled.ResourceMetrics
for this scanner.KuduScanToken
APIKuduScanToken
APIKuduException
s that can tell you which
+ RPC failed.KuduScanner.nextRows()
is called.KuduScanner
from this scan token.KuduPartitioner
.AsyncKuduScanner
.KuduScanner
.AsyncKuduSession
.AsyncKuduSession
based on this transaction.KuduPredicate
on a boolean column.IS NOT NULL
predicate.IS NULL
predicate.KuduSession
based on this transaction.AsyncKuduScanner.AsyncKuduScannerBuilder
for a particular table.KuduScanner.KuduScannerBuilder
for a particular table.KuduScanToken.KuduScanTokenBuilder
for a particular table.Schema.newPartialRow()
+ to create a new partial row.byte[]
.boolean
.byte
.short
.int
.long
.float
.double
.String
.KuduPredicate
into a byte array.KuduScanToken
into a byte array.KuduTransaction.serialize(SerializationOptions)
+ method invoked with default-constructed KuduTransaction.SerializationOptions
.PartialRow.addLong(String, long)
for the
+ format.RowResult
object returned by the RowResultIterator
+ will be reused with each call to Iterator.next()
.RowResult
object returned by the RowResultIterator
+ will be reused with each call to Iterator.next()
.PartialRow.addLong(String, long)
for the
+ format.KuduClient
which wraps this asynchronous client.KuduPredicate
.Common.DataType
to override the Type
+ when serializing the ColumnSchema on the wire.Common.DataType
to override the Type
+ when serializing the ColumnSchema on the wire.Common.DataType
to override the Type
+ when serializing the ColumnSchema on the wire.Common.DataType
to override the Type
+ when serializing the ColumnSchema on the wire.@InterfaceAudience.Public + @InterfaceStability.Evolving +public static class ColumnSchema.AutoIncrementingColumnSchemaBuilder +extends Object+
Constructor and Description | +
---|
AutoIncrementingColumnSchemaBuilder()
+Constructor with default parameter values for
+ColumnSchema . |
+
Modifier and Type | +Method and Description | +
---|---|
ColumnSchema |
+build()
+Builds a
+ColumnSchema for auto-incrementing column with passed parameters. |
+
ColumnSchema.AutoIncrementingColumnSchemaBuilder |
+comment(String comment)
+Set the comment for this column.
+ |
+
ColumnSchema.AutoIncrementingColumnSchemaBuilder |
+compressionAlgorithm(ColumnSchema.CompressionAlgorithm compressionAlgorithm)
+Set the compression algorithm for this column.
+ |
+
ColumnSchema.AutoIncrementingColumnSchemaBuilder |
+desiredBlockSize(int desiredBlockSize)
+Set the desired block size for this column.
+ |
+
ColumnSchema.AutoIncrementingColumnSchemaBuilder |
+encoding(ColumnSchema.Encoding encoding)
+Set the block encoding for this column.
+ |
+
public AutoIncrementingColumnSchemaBuilder()+
ColumnSchema
.public ColumnSchema.AutoIncrementingColumnSchemaBuilder desiredBlockSize(int desiredBlockSize)+
public ColumnSchema.AutoIncrementingColumnSchemaBuilder encoding(ColumnSchema.Encoding encoding)+
public ColumnSchema.AutoIncrementingColumnSchemaBuilder compressionAlgorithm(ColumnSchema.CompressionAlgorithm compressionAlgorithm)+
public ColumnSchema.AutoIncrementingColumnSchemaBuilder comment(String comment)+
public ColumnSchema build()+
ColumnSchema
for auto-incrementing column with passed parameters.ColumnSchema
@InterfaceAudience.Public + @InterfaceStability.Evolving +public static class ColumnSchema.ColumnSchemaBuilder +extends Object+
Constructor and Description | +
---|
ColumnSchemaBuilder(ColumnSchema that)
+Constructor to copy an existing columnSchema
+ |
+
ColumnSchemaBuilder(String name,
+ Type type)
+Constructor for the required parameters.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
ColumnSchema |
+build()
+Builds a
+ColumnSchema using the passed parameters. |
+
ColumnSchema.ColumnSchemaBuilder |
+comment(String comment)
+Set the comment for this column.
+ |
+
ColumnSchema.ColumnSchemaBuilder |
+compressionAlgorithm(ColumnSchema.CompressionAlgorithm compressionAlgorithm)
+Set the compression algorithm for this column.
+ |
+
ColumnSchema.ColumnSchemaBuilder |
+defaultValue(Object defaultValue)
+Sets the default value that will be read from the column.
+ |
+
ColumnSchema.ColumnSchemaBuilder |
+desiredBlockSize(int desiredBlockSize)
+Set the desired block size for this column.
+ |
+
ColumnSchema.ColumnSchemaBuilder |
+encoding(ColumnSchema.Encoding encoding)
+Set the block encoding for this column.
+ |
+
ColumnSchema.ColumnSchemaBuilder |
+immutable(boolean immutable)
+Marks the column as immutable or not.
+ |
+
ColumnSchema.ColumnSchemaBuilder |
+key(boolean key)
+Sets if the column is part of the row key.
+ |
+
ColumnSchema.ColumnSchemaBuilder |
+nonUniqueKey(boolean key)
+Sets if the column is part of the row non unique key.
+ |
+
ColumnSchema.ColumnSchemaBuilder |
+nullable(boolean nullable)
+Marks the column as allowing null values.
+ |
+
ColumnSchema.ColumnSchemaBuilder |
+typeAttributes(ColumnTypeAttributes typeAttributes)
+Set the column type attributes for this column.
+ |
+
public ColumnSchemaBuilder(String name, + Type type)+
name
- column's nametype
- column's typeIllegalArgumentException
- if the column's name equals the reserved
+ auto-incrementing column namepublic ColumnSchemaBuilder(ColumnSchema that)+
that
- the columnSchema to copypublic ColumnSchema.ColumnSchemaBuilder key(boolean key)+
key
- a boolean that indicates if the column is part of the keypublic ColumnSchema.ColumnSchemaBuilder nonUniqueKey(boolean key)+
key
- a boolean that indicates if the column is a part of the non unique keypublic ColumnSchema.ColumnSchemaBuilder nullable(boolean nullable)+
+ NOTE: the "not-nullable-by-default" behavior here differs from
+ the equivalent API in the Python and C++ clients. It also differs from the
+ standard behavior of SQL CREATE TABLE
statements. It is
+ recommended to always specify nullability explicitly using this API
+ in order to avoid confusion.
nullable
- a boolean that indicates if the column allows null valuespublic ColumnSchema.ColumnSchemaBuilder immutable(boolean immutable)+
immutable
- a boolean that indicates if the column is immutablepublic ColumnSchema.ColumnSchemaBuilder defaultValue(Object defaultValue)+
defaultValue
- a Java object representation of the default value that's readpublic ColumnSchema.ColumnSchemaBuilder desiredBlockSize(int desiredBlockSize)+
desiredBlockSize
- the desired block size, in bytespublic ColumnSchema.ColumnSchemaBuilder encoding(ColumnSchema.Encoding encoding)+
public ColumnSchema.ColumnSchemaBuilder compressionAlgorithm(ColumnSchema.CompressionAlgorithm compressionAlgorithm)+
public ColumnSchema.ColumnSchemaBuilder typeAttributes(ColumnTypeAttributes typeAttributes)+
public ColumnSchema.ColumnSchemaBuilder comment(String comment)+
public ColumnSchema build()+
ColumnSchema
using the passed parameters.ColumnSchema
@InterfaceAudience.Public + @InterfaceStability.Evolving +public static enum ColumnSchema.CompressionAlgorithm +extends Enum<ColumnSchema.CompressionAlgorithm>+
Enum Constant and Description | +
---|
DEFAULT_COMPRESSION |
+
LZ4 |
+
NO_COMPRESSION |
+
SNAPPY |
+
UNKNOWN |
+
ZLIB |
+
Modifier and Type | +Method and Description | +
---|---|
static ColumnSchema.CompressionAlgorithm |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ColumnSchema.CompressionAlgorithm[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final ColumnSchema.CompressionAlgorithm UNKNOWN+
public static final ColumnSchema.CompressionAlgorithm DEFAULT_COMPRESSION+
public static final ColumnSchema.CompressionAlgorithm NO_COMPRESSION+
public static final ColumnSchema.CompressionAlgorithm SNAPPY+
public static final ColumnSchema.CompressionAlgorithm LZ4+
public static final ColumnSchema.CompressionAlgorithm ZLIB+
public static ColumnSchema.CompressionAlgorithm[] values()+
+for (ColumnSchema.CompressionAlgorithm c : ColumnSchema.CompressionAlgorithm.values()) + System.out.println(c); +
public static ColumnSchema.CompressionAlgorithm valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@InterfaceAudience.Public + @InterfaceStability.Evolving +public static enum ColumnSchema.Encoding +extends Enum<ColumnSchema.Encoding>+
Enum Constant and Description | +
---|
AUTO_ENCODING |
+
BIT_SHUFFLE |
+
DICT_ENCODING |
+
GROUP_VARINT |
+
PLAIN_ENCODING |
+
PREFIX_ENCODING |
+
RLE |
+
UNKNOWN |
+
Modifier and Type | +Method and Description | +
---|---|
static ColumnSchema.Encoding |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ColumnSchema.Encoding[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final ColumnSchema.Encoding UNKNOWN+
public static final ColumnSchema.Encoding AUTO_ENCODING+
public static final ColumnSchema.Encoding PLAIN_ENCODING+
public static final ColumnSchema.Encoding PREFIX_ENCODING+
public static final ColumnSchema.Encoding GROUP_VARINT+
public static final ColumnSchema.Encoding RLE+
public static final ColumnSchema.Encoding DICT_ENCODING+
public static final ColumnSchema.Encoding BIT_SHUFFLE+
public static ColumnSchema.Encoding[] values()+
+for (ColumnSchema.Encoding c : ColumnSchema.Encoding.values()) + System.out.println(c); +
public static ColumnSchema.Encoding valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@InterfaceAudience.Public + @InterfaceStability.Evolving +public class ColumnSchema +extends Object+
ColumnSchema.ColumnSchemaBuilder
in order to
+ create columns.Modifier and Type | +Class and Description | +
---|---|
static class |
+ColumnSchema.AutoIncrementingColumnSchemaBuilder
+Builder for ColumnSchema of the auto-incrementing column.
+ |
+
static class |
+ColumnSchema.ColumnSchemaBuilder
+Builder for ColumnSchema.
+ |
+
static class |
+ColumnSchema.CompressionAlgorithm
+Specifies the compression algorithm of data for a column on disk.
+ |
+
static class |
+ColumnSchema.Encoding
+Specifies the encoding of data for a column on disk.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+equals(Object o) |
+
String |
+getComment()
+Return the comment for the column.
+ |
+
ColumnSchema.CompressionAlgorithm |
+getCompressionAlgorithm()
+Return the compression algorithm of this column, or null if it is not known.
+ |
+
Object |
+getDefaultValue()
+The Java object representation of the default value that's read
+ |
+
int |
+getDesiredBlockSize()
+Gets the desired block size for this column.
+ |
+
ColumnSchema.Encoding |
+getEncoding()
+Return the encoding of this column, or null if it is not known.
+ |
+
String |
+getName()
+Get the column's name
+ |
+
Type |
+getType()
+Get the column's Type
+ |
+
ColumnTypeAttributes |
+getTypeAttributes()
+Return the column type attributes for the column, or null if it is not known.
+ |
+
int |
+getTypeSize()
+The size of this type in bytes on the wire.
+ |
+
int |
+hashCode() |
+
boolean |
+isAutoIncrementing()
+Answers if the column is auto-incrementing column
+ |
+
boolean |
+isImmutable()
+Answers if the column is immutable
+ |
+
boolean |
+isKey()
+Answers if the column part of the key
+ |
+
boolean |
+isKeyUnique()
+Answers if the key is unique
+ |
+
boolean |
+isNullable()
+Answers if the column can be set to null
+ |
+
String |
+toString() |
+
public Type getType()+
public String getName()+
public boolean isKey()+
public boolean isKeyUnique()+
public boolean isNullable()+
public boolean isImmutable()+
public boolean isAutoIncrementing()+
public Object getDefaultValue()+
public int getDesiredBlockSize()+
public ColumnSchema.Encoding getEncoding()+
public ColumnSchema.CompressionAlgorithm getCompressionAlgorithm()+
public ColumnTypeAttributes getTypeAttributes()+
public int getTypeSize()+
public String getComment()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public static class ColumnTypeAttributes.ColumnTypeAttributesBuilder +extends Object+
Constructor and Description | +
---|
ColumnTypeAttributesBuilder() |
+
Modifier and Type | +Method and Description | +
---|---|
ColumnTypeAttributes |
+build()
+Builds a
+ColumnTypeAttributes using the passed parameters. |
+
ColumnTypeAttributes.ColumnTypeAttributesBuilder |
+length(int length) |
+
ColumnTypeAttributes.ColumnTypeAttributesBuilder |
+precision(int precision)
+Set the precision.
+ |
+
ColumnTypeAttributes.ColumnTypeAttributesBuilder |
+scale(int scale)
+Set the scale.
+ |
+
public ColumnTypeAttributesBuilder()+
public ColumnTypeAttributes.ColumnTypeAttributesBuilder precision(int precision)+
public ColumnTypeAttributes.ColumnTypeAttributesBuilder scale(int scale)+
public ColumnTypeAttributes.ColumnTypeAttributesBuilder length(int length)+
public ColumnTypeAttributes build()+
ColumnTypeAttributes
using the passed parameters.ColumnTypeAttributes
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class ColumnTypeAttributes +extends Object+
Modifier and Type | +Class and Description | +
---|---|
static class |
+ColumnTypeAttributes.ColumnTypeAttributesBuilder
+Builder for ColumnTypeAttributes.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+equals(Object o) |
+
int |
+getLength()
+Returns the length;
+ |
+
int |
+getPrecision()
+Return the precision;
+ |
+
int |
+getScale()
+Return the scale;
+ |
+
int |
+hashCode() |
+
boolean |
+hasLength()
+Returns true if the length is set;
+ |
+
boolean |
+hasPrecision()
+Returns true if the precision is set;
+ |
+
boolean |
+hasScale()
+Returns true if the scale is set;
+ |
+
String |
+toString() |
+
String |
+toStringForType(Type type)
+Return a string representation appropriate for `type`.
+ |
+
public boolean hasPrecision()+
public int getPrecision()+
public boolean hasScale()+
public int getScale()+
public boolean hasLength()+
public int getLength()+
public String toStringForType(Type type)+
type
- the type.@InterfaceAudience.Public + @InterfaceStability.Evolving +public class Schema +extends Object+
Constructor and Description | +
---|
Schema(List<ColumnSchema> columns)
+Constructs a schema using the specified columns and does some internal accounting
+ |
+
Schema(List<ColumnSchema> columns,
+ List<Integer> columnIds)
+Constructs a schema using the specified columns and IDs.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+equals(Object obj) |
+
static String |
+getAutoIncrementingColumnName()
+Get the name of the auto-incrementing column
+ |
+
static Type |
+getAutoIncrementingColumnType()
+Get the type of the auto-incrementing column
+ |
+
ColumnSchema |
+getColumn(String columnName)
+Get the column associated with the specified name
+ |
+
ColumnSchema |
+getColumnByIndex(int idx)
+Get the column at the specified index in the original list
+ |
+
int |
+getColumnCount()
+Get the count of columns in this schema
+ |
+
int |
+getColumnIndex(int columnId)
+Get the column index of the column with the provided ID.
+ |
+
int |
+getColumnIndex(String columnName)
+Get the index for the provided column name.
+ |
+
int |
+getColumnOffset(int idx)
+Get the index at which this column can be found in the backing byte array
+ |
+
List<ColumnSchema> |
+getColumns()
+Get the list of columns used to create this schema
+ |
+
int |
+getPrimaryKeyColumnCount()
+Get the count of columns that are part of the primary key.
+ |
+
List<ColumnSchema> |
+getPrimaryKeyColumns()
+Get the primary key columns.
+ |
+
Schema |
+getRowKeyProjection()
+Get a schema that only contains the columns which are part of the key
+ |
+
int |
+getRowSize()
+Get the size a row built using this schema would be
+ |
+
int |
+getVarLengthColumnCount()
+Get the count of columns with variable length (BINARY/STRING) in
+ this schema.
+ |
+
boolean |
+hasAutoIncrementingColumn()
+Tells if there's auto-incrementing column
+ |
+
boolean |
+hasColumn(String columnName)
+Returns true if the column exists.
+ |
+
boolean |
+hasColumnIds()
+Tells whether this schema includes IDs for columns.
+ |
+
int |
+hashCode() |
+
boolean |
+hasImmutableColumns()
+Tells if there's at least one immutable column
+ |
+
boolean |
+hasNullableColumns()
+Tells if there's at least one nullable column
+ |
+
boolean |
+isPrimaryKeyUnique()
+Answers if the primary key is unique for the table
+ |
+
PartialRow |
+newPartialRow()
+Creates a new partial row for the schema.
+ |
+
public Schema(List<ColumnSchema> columns)+
columns
- the columns in index order
+
+ See ColumnPBsToSchema()
in src/kudu/common/wire_protocol.cc
public Schema(List<ColumnSchema> columns, + List<Integer> columnIds)+
Schema(List)
to create a new schema.columns
- the columns in index ordercolumnIds
- the column ids of the provided columns, or nullIllegalArgumentException
- If the column ids length does not match the columns length
+
+ See ColumnPBsToSchema()
in src/kudu/common/wire_protocol.cc
public List<ColumnSchema> getColumns()+
public int getVarLengthColumnCount()+
public int getRowSize()+
public int getColumnOffset(int idx)+
idx
- column's indexpublic boolean hasColumn(String columnName)+
columnName
- column to search forpublic int getColumnIndex(String columnName)+
columnName
- column to search forpublic int getColumnIndex(int columnId)+
columnId
- the column id of the columnpublic ColumnSchema getColumnByIndex(int idx)+
idx
- column's indexpublic ColumnSchema getColumn(String columnName)+
columnName
- column's namepublic int getColumnCount()+
public int getPrimaryKeyColumnCount()+
public List<ColumnSchema> getPrimaryKeyColumns()+
public boolean isPrimaryKeyUnique()+
public boolean hasAutoIncrementingColumn()+
public static String getAutoIncrementingColumnName()+
public static Type getAutoIncrementingColumnType()+
public Schema getRowKeyProjection()+
public boolean hasNullableColumns()+
public boolean hasImmutableColumns()+
public boolean hasColumnIds()+
public PartialRow newPartialRow()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public enum Type +extends Enum<Type>+
Enum Constant and Description | +
---|
BINARY |
+
BOOL |
+
DATE |
+
DECIMAL |
+
DOUBLE |
+
FLOAT |
+
INT16 |
+
INT32 |
+
INT64 |
+
INT8 |
+
STRING |
+
UNIXTIME_MICROS |
+
VARCHAR |
+
Modifier and Type | +Method and Description | +
---|---|
org.apache.kudu.Common.DataType |
+getDataType()
+Deprecated.
+
+
+ |
+
org.apache.kudu.Common.DataType |
+getDataType(ColumnTypeAttributes typeAttributes)
+Get the data type from the common's pb
+ |
+
String |
+getName()
+Get the string representation of this type
+ |
+
int |
+getSize()
+Deprecated.
+
+
+ |
+
int |
+getSize(ColumnTypeAttributes typeAttributes)
+The size of this type on the wire
+ |
+
static Type |
+getTypeForDataType(org.apache.kudu.Common.DataType type)
+Convert the pb DataType to a Type
+ |
+
static Type |
+getTypeForName(String name)
+Create a Type from its name
+ |
+
boolean |
+isFixedSize() |
+
String |
+toString() |
+
static Type |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Type[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final Type INT8+
public static final Type INT16+
public static final Type INT32+
public static final Type INT64+
public static final Type BINARY+
public static final Type STRING+
public static final Type BOOL+
public static final Type FLOAT+
public static final Type DOUBLE+
public static final Type UNIXTIME_MICROS+
public static final Type DECIMAL+
public static final Type VARCHAR+
public static final Type DATE+
public static Type[] values()+
+for (Type c : Type.values()) + System.out.println(c); +
public static Type valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Deprecated +public org.apache.kudu.Common.DataType getDataType()+
getDataType(ColumnTypeAttributes)
public org.apache.kudu.Common.DataType getDataType(ColumnTypeAttributes typeAttributes)+
typeAttributes
- the additional attributes of the type.public String getName()+
@Deprecated +public int getSize()+
getSize(ColumnTypeAttributes)
public int getSize(ColumnTypeAttributes typeAttributes)+
typeAttributes
- the additional attributes of the type.public static Type getTypeForDataType(org.apache.kudu.Common.DataType type)+
type
- DataType to convertpublic static Type getTypeForName(String name)+
name
- The DataType name. It accepts Type name (from the getName()
+ method) and ENUM name (from the name() method).IllegalArgumentException
- if the provided name doesn't map to any
+ known type.public boolean isFixedSize()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public abstract class AbstractKuduScannerBuilder<S extends AbstractKuduScannerBuilder<? super S,T>,T> +extends Object+
Modifier and Type | +Method and Description | +
---|---|
S |
+addColumnRangePredicate(ColumnRangePredicate predicate)
+Deprecated.
+
+
+ |
+
S |
+addColumnRangePredicatesRaw(byte[] predicateBytes)
+Deprecated.
+
+
+ |
+
S |
+addPredicate(KuduPredicate predicate)
+Adds a predicate to the scan.
+ |
+
S |
+batchSizeBytes(int batchSizeBytes)
+Sets the maximum number of bytes returned by the scanner, on each batch.
+ |
+
abstract T |
+build() |
+
S |
+cacheBlocks(boolean cacheBlocks)
+Sets the block caching policy for the scanner.
+ |
+
S |
+exclusiveUpperBound(PartialRow partialRow)
+Add an upper bound (exclusive) primary key for the scan.
+ |
+
S |
+exclusiveUpperBoundRaw(byte[] endPrimaryKey)
+Deprecated.
+
+
+ |
+
S |
+keepAlivePeriodMs(long keepAlivePeriodMs)
+Set the period at which to send keep-alive requests to the tablet
+ server to ensure that this scanner will not time out.
+ |
+
S |
+limit(long limit)
+Sets a limit on the number of rows that will be returned by the scanner.
+ |
+
S |
+lowerBound(PartialRow partialRow)
+Add a lower bound (inclusive) primary key for the scan.
+ |
+
S |
+lowerBoundRaw(byte[] startPrimaryKey)
+Deprecated.
+
+
+ |
+
S |
+prefetching(boolean prefetching)
+Enables prefetching of rows for the scanner, i.e.
+ |
+
S |
+readMode(AsyncKuduScanner.ReadMode readMode)
+Sets the read mode, the default is to read the latest values.
+ |
+
S |
+replicaSelection(ReplicaSelection replicaSelection)
+Sets the replica selection mechanism for this scanner.
+ |
+
S |
+scanRequestTimeout(long scanRequestTimeout)
+Sets how long each scan request to a server can last.
+ |
+
S |
+setFaultTolerant(boolean isFaultTolerant)
+Make scans resumable at another tablet server if current server fails if
+ isFaultTolerant is true.
+ |
+
S |
+setProjectedColumnIndexes(List<Integer> columnIndexes)
+Set which columns will be read by the Scanner.
+ |
+
S |
+setProjectedColumnNames(List<String> columnNames)
+Set which columns will be read by the Scanner.
+ |
+
S |
+snapshotTimestampMicros(long timestamp)
+Sets the timestamp the scan must be executed at, in microseconds since the Unix epoch.
+ |
+
public S readMode(AsyncKuduScanner.ReadMode readMode)+
readMode
- a read mode for the scannerpublic S setFaultTolerant(boolean isFaultTolerant)+
+ Scans are by default non fault-tolerant, and scans will fail + if scanning an individual tablet fails (for example, if a tablet server + crashes in the middle of a tablet scan). If isFaultTolerant is set to true, + scans will be resumed at another tablet server in the case of failure. + + Fault-tolerant scans typically have lower throughput than non + fault-tolerant scans. Fault tolerant scans use READ_AT_SNAPSHOT read mode. + If no snapshot timestamp is provided, the server will pick one.
isFaultTolerant
- a boolean that indicates if scan is fault-tolerant@Deprecated +public S addColumnRangePredicate(ColumnRangePredicate predicate)+
addPredicate(KuduPredicate)
predicate
- predicate for a column to add@Deprecated +public S addColumnRangePredicatesRaw(byte[] predicateBytes)+
addPredicate(org.apache.kudu.client.KuduPredicate)
ColumnRangePredicate.toByteArray(List)
.predicateBytes
- predicates to addIllegalArgumentException
- thrown when the passed bytes aren't validpublic S addPredicate(KuduPredicate predicate)+
predicate
- predicate to addpublic S setProjectedColumnNames(List<String> columnNames)+
setProjectedColumnIndexes(List)
will reset the projected
+ columns to those specified in columnNames
.columnNames
- the names of columns to read, or 'null' to read all columns
+ (the default)public S setProjectedColumnIndexes(List<Integer> columnIndexes)+
setProjectedColumnNames(List)
will reset the projected
+ columns to those specified in columnIndexes
.columnIndexes
- the indexes of columns to read, or 'null' to read all columns
+ (the default)public S batchSizeBytes(int batchSizeBytes)+
+ Kudu may actually return more than this many bytes because it will not + truncate a rowResult in the middle.
batchSizeBytes
- a strictly positive number of bytespublic S limit(long limit)+
limit
- a positive longpublic S prefetching(boolean prefetching)+
nextRows()
). Disabled by default.
+ NOTE: This is risky until KUDU-1260 is resolved.prefetching
- a boolean that indicates if the scanner should prefetch rowspublic S cacheBlocks(boolean cacheBlocks)+
cacheBlocks
- a boolean that indicates if data blocks should be cached or notpublic S snapshotTimestampMicros(long timestamp)+
timestamp
- a long representing an instant in microseconds since the unix epoch.IllegalArgumentException
- on build(), if the timestamp is less than 0 or if the
+ read mode was not set to READ_AT_SNAPSHOTpublic S scanRequestTimeout(long scanRequestTimeout)+
KuduClient.getDefaultOperationTimeoutMs()
.scanRequestTimeout
- a long representing time in millisecondspublic S lowerBound(PartialRow partialRow)+
partialRow
- a partial row with specified key columns@Deprecated +public S lowerBoundRaw(byte[] startPrimaryKey)+
lowerBound(PartialRow)
startPrimaryKey
- bytes containing an encoded start keypublic S exclusiveUpperBound(PartialRow partialRow)+
partialRow
- a partial row with specified key columns@Deprecated +public S exclusiveUpperBoundRaw(byte[] endPrimaryKey)+
exclusiveUpperBound(PartialRow)
endPrimaryKey
- bytes containing an encoded end keypublic S replicaSelection(ReplicaSelection replicaSelection)+
replicaSelection
- replication selection mechanism to usepublic S keepAlivePeriodMs(long keepAlivePeriodMs)+
keepAlivePeriodMs
- the keep alive period in millisecondspublic abstract T build()+
@InterfaceAudience.Public + @InterfaceStability.Unstable +public class AlterTableOptions +extends Object+
Constructor and Description | +
---|
AlterTableOptions() |
+
Modifier and Type | +Method and Description | +
---|---|
AlterTableOptions |
+addColumn(ColumnSchema colSchema)
+Add a new column.
+ |
+
AlterTableOptions |
+addColumn(String name,
+ Type type,
+ Object defaultVal)
+Add a new column that's not nullable.
+ |
+
AlterTableOptions |
+addNullableColumn(String name,
+ Type type)
+Add a new column that's nullable and has no default value.
+ |
+
AlterTableOptions |
+addNullableColumn(String name,
+ Type type,
+ Object defaultVal)
+Add a new column that's nullable.
+ |
+
AlterTableOptions |
+addRangePartition(PartialRow lowerBound,
+ PartialRow upperBound)
+Add a range partition to the table with an inclusive lower bound and an exclusive upper bound.
+ |
+
AlterTableOptions |
+addRangePartition(PartialRow lowerBound,
+ PartialRow upperBound,
+ RangePartitionBound lowerBoundType,
+ RangePartitionBound upperBoundType)
+Add a range partition to the table with a lower bound and upper bound.
+ |
+
AlterTableOptions |
+addRangePartition(PartialRow lowerBound,
+ PartialRow upperBound,
+ String dimensionLabel,
+ RangePartitionBound lowerBoundType,
+ RangePartitionBound upperBoundType)
+Add a range partition to the table with dimension label.
+ |
+
AlterTableOptions |
+addRangePartition(RangePartitionWithCustomHashSchema range)
+Similar to the other addRangePartition() methods, but instead of adding a
+ range with table-wide hash schema, this method adds a range with
+ custom hash schema.
+ |
+
AlterTableOptions |
+alterExtraConfigs(Map<String,String> extraConfig)
+Change the table's extra configuration properties.
+ |
+
AlterTableOptions |
+changeComment(String name,
+ String comment)
+Change the comment for the column.
+ |
+
AlterTableOptions |
+changeCompressionAlgorithm(String name,
+ ColumnSchema.CompressionAlgorithm ca)
+Change the compression used for a column.
+ |
+
AlterTableOptions |
+changeDefault(String name,
+ Object newDefault)
+Change the default value for a column.
+ |
+
AlterTableOptions |
+changeDesiredBlockSize(String name,
+ int blockSize)
+Change the block size of a column's storage.
+ |
+
AlterTableOptions |
+changeEncoding(String name,
+ ColumnSchema.Encoding encoding)
+Change the encoding used for a column.
+ |
+
AlterTableOptions |
+changeImmutable(String name,
+ boolean immutable)
+Change the immutable attribute for the column.
+ |
+
AlterTableOptions |
+dropColumn(String name)
+Drop a column.
+ |
+
AlterTableOptions |
+dropRangePartition(PartialRow lowerBound,
+ PartialRow upperBound)
+Drop the range partition from the table with the specified inclusive lower bound and exclusive
+ upper bound.
+ |
+
AlterTableOptions |
+dropRangePartition(PartialRow lowerBound,
+ PartialRow upperBound,
+ RangePartitionBound lowerBoundType,
+ RangePartitionBound upperBoundType)
+Drop the range partition from the table with the specified lower bound and upper bound.
+ |
+
AlterTableOptions |
+removeDefault(String name)
+Remove the default value for a column.
+ |
+
AlterTableOptions |
+renameColumn(String oldName,
+ String newName)
+Change the name of a column.
+ |
+
AlterTableOptions |
+renameTable(String newName)
+Change a table's name.
+ |
+
AlterTableOptions |
+setComment(String comment)
+Change a table's comment.
+ |
+
AlterTableOptions |
+setOwner(String owner)
+Change a table's owner.
+ |
+
AlterTableOptions |
+setWait(boolean wait)
+Whether to wait for the table to be fully altered before this alter
+ operation is considered to be finished.
+ |
+
public AlterTableOptions renameTable(String newName)+
newName
- new table's name, must be used to check progresspublic AlterTableOptions setOwner(String owner)+
owner
- the new table ownerpublic AlterTableOptions setComment(String comment)+
comment
- the new table commentpublic AlterTableOptions addColumn(ColumnSchema colSchema)+
colSchema
- the schema of the new columnpublic AlterTableOptions addColumn(String name, + Type type, + Object defaultVal)+
name
- name of the new columntype
- type of the new columndefaultVal
- default value used for the currently existing rowspublic AlterTableOptions addNullableColumn(String name, + Type type)+
name
- name of the new columntype
- type of the new columnpublic AlterTableOptions addNullableColumn(String name, + Type type, + Object defaultVal)+
name
- name of the new columntype
- type of the new columndefaultVal
- the default value of the new columnpublic AlterTableOptions dropColumn(String name)+
name
- name of the columnpublic AlterTableOptions renameColumn(String oldName, + String newName)+
oldName
- old column's name, must existnewName
- new name to usepublic AlterTableOptions removeDefault(String name)+
name
- name of the columnpublic AlterTableOptions changeDefault(String name, + Object newDefault)+
IllegalArgumentException
.name
- name of the columnnewDefault
- the new default valuepublic AlterTableOptions changeDesiredBlockSize(String name, + int blockSize)+
name
- name of the columnblockSize
- the new block sizepublic AlterTableOptions changeEncoding(String name, + ColumnSchema.Encoding encoding)+
name
- name of the columnencoding
- the new encodingpublic AlterTableOptions changeCompressionAlgorithm(String name, + ColumnSchema.CompressionAlgorithm ca)+
name
- the name of the columnca
- the new compression algorithmpublic AlterTableOptions addRangePartition(PartialRow lowerBound, + PartialRow upperBound)+
lowerBound
- inclusive lower bound, may be empty but not nullupperBound
- exclusive upper bound, may be empty but not nullpublic AlterTableOptions addRangePartition(PartialRow lowerBound, + PartialRow upperBound, + RangePartitionBound lowerBoundType, + RangePartitionBound upperBoundType)+
lowerBound
- lower bound, may be empty but not nullupperBound
- upper bound, may be empty but not nulllowerBoundType
- the type of the lower bound, either inclusive or exclusiveupperBoundType
- the type of the upper bound, either inclusive or exclusivepublic AlterTableOptions addRangePartition(PartialRow lowerBound, + PartialRow upperBound, + String dimensionLabel, + RangePartitionBound lowerBoundType, + RangePartitionBound upperBoundType)+
lowerBound
- lower bound, may be empty but not nullupperBound
- upper bound, may be empty but not nulldimensionLabel
- the dimension label for the tablet to be createdlowerBoundType
- the type of the lower bound, either inclusive or exclusiveupperBoundType
- the type of the upper bound, either inclusive or exclusivepublic AlterTableOptions addRangePartition(RangePartitionWithCustomHashSchema range)+
range
- the range with custom hash schemapublic AlterTableOptions dropRangePartition(PartialRow lowerBound, + PartialRow upperBound)+
lowerBound
- inclusive lower bound, can be empty but not nullupperBound
- exclusive upper bound, can be empty but not nullpublic AlterTableOptions dropRangePartition(PartialRow lowerBound, + PartialRow upperBound, + RangePartitionBound lowerBoundType, + RangePartitionBound upperBoundType)+
lowerBound
- inclusive lower bound, can be empty but not nullupperBound
- exclusive upper bound, can be empty but not nulllowerBoundType
- the type of the lower bound, either inclusive or exclusiveupperBoundType
- the type of the upper bound, either inclusive or exclusivepublic AlterTableOptions changeComment(String name, + String comment)+
name
- name of the columncomment
- the new comment for the column, an empty comment means
+ deleting an existing comment.public AlterTableOptions changeImmutable(String name, + boolean immutable)+
name
- name of the columnimmutable
- the new immutable attribute for the column.public AlterTableOptions alterExtraConfigs(Map<String,String> extraConfig)+
extraConfig
- the table's extra configuration propertiespublic AlterTableOptions setWait(boolean wait)+
+ If false, the alter will finish quickly, but a subsequent
+ KuduClient.openTable(String)
may return a KuduTable
with
+ an out-of-date schema.
+
+ If true, the alter will take longer, but the very next schema is guaranteed + to be up-to-date. +
+ If not provided, defaults to true. +
wait
- whether to wait for the table to be fully altered@InterfaceAudience.Public + @InterfaceStability.Evolving +public class AlterTableResponse +extends Object+
Modifier and Type | +Method and Description | +
---|---|
long |
+getElapsedMillis()
+Get the number of milliseconds elapsed since the RPC was created up to the moment when this
+ response was created.
+ |
+
String |
+getTableId() |
+
String |
+getTsUUID()
+Get the identifier of the tablet server that sent the response.
+ |
+
public String getTableId()+
public long getElapsedMillis()+
public String getTsUUID()+
null
if the RPC failed before tablet location lookup succeeded.@InterfaceAudience.Public + @InterfaceStability.Evolving +public static final class AsyncKuduClient.AsyncKuduClientBuilder +extends Object+
Constructor and Description | +
---|
AsyncKuduClientBuilder(List<String> masterAddresses)
+Creates a new builder for a client that will connect to the specified masters.
+ |
+
AsyncKuduClientBuilder(String masterAddresses)
+Creates a new builder for a client that will connect to the specified masters.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
AsyncKuduClient.AsyncKuduClientBuilder |
+bossCount(int bossCount)
+Deprecated.
+
+the bossExecutor is no longer used and will have no effect if provided
+ |
+
AsyncKuduClient |
+build()
+Creates a new client that connects to the masters.
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder |
+connectionNegotiationTimeoutMs(long timeoutMs)
+Sets the default timeout used for connection negotiation.
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder |
+defaultAdminOperationTimeoutMs(long timeoutMs)
+Sets the default timeout used for administrative operations (e.g.
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder |
+defaultOperationTimeoutMs(long timeoutMs)
+Sets the default timeout used for user operations (using sessions and scanners).
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder |
+defaultSocketReadTimeoutMs(long timeoutMs)
+Deprecated.
+
+this option no longer has any effect
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder |
+disableStatistics()
+Disable this client's collection of statistics.
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder |
+encryptionPolicy(org.apache.kudu.client.AsyncKuduClient.EncryptionPolicy encryptionPolicy)
+Require encryption for the connection to a remote server.
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder |
+nioExecutor(Executor workerExecutor)
+Set the executor which will be used for the embedded Netty workers.
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder |
+nioExecutors(Executor bossExecutor,
+ Executor workerExecutor)
+Deprecated.
+
+the bossExecutor is no longer used and will have no effect if provided
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder |
+requireAuthentication(boolean requireAuthentication)
+Require authentication for the connection to a remote server.
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder |
+saslProtocolName(String saslProtocolName)
+Set the SASL protocol name.
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder |
+workerCount(int workerCount)
+Set the maximum number of Netty worker threads.
+ |
+
public AsyncKuduClientBuilder(String masterAddresses)+
masterAddresses
- comma-separated list of "host:port" pairs of the masterspublic AsyncKuduClientBuilder(List<String> masterAddresses)+
Here are some examples of recognized formats: +
masterAddresses
- list of master addressespublic AsyncKuduClient.AsyncKuduClientBuilder defaultAdminOperationTimeoutMs(long timeoutMs)+
timeoutMs
- a timeout in millisecondspublic AsyncKuduClient.AsyncKuduClientBuilder defaultOperationTimeoutMs(long timeoutMs)+
timeoutMs
- a timeout in millisecondspublic AsyncKuduClient.AsyncKuduClientBuilder connectionNegotiationTimeoutMs(long timeoutMs)+
timeoutMs
- a timeout in milliseconds@Deprecated +public AsyncKuduClient.AsyncKuduClientBuilder defaultSocketReadTimeoutMs(long timeoutMs)+
timeoutMs
- a timeout in milliseconds@Deprecated +public AsyncKuduClient.AsyncKuduClientBuilder nioExecutors(Executor bossExecutor, + Executor workerExecutor)+
public AsyncKuduClient.AsyncKuduClientBuilder nioExecutor(Executor workerExecutor)+
@Deprecated +public AsyncKuduClient.AsyncKuduClientBuilder bossCount(int bossCount)+
public AsyncKuduClient.AsyncKuduClientBuilder workerCount(int workerCount)+
public AsyncKuduClient.AsyncKuduClientBuilder requireAuthentication(boolean requireAuthentication)+
public AsyncKuduClient.AsyncKuduClientBuilder encryptionPolicy(org.apache.kudu.client.AsyncKuduClient.EncryptionPolicy encryptionPolicy)+
public AsyncKuduClient.AsyncKuduClientBuilder disableStatistics()+
public AsyncKuduClient.AsyncKuduClientBuilder saslProtocolName(String saslProtocolName)+
public AsyncKuduClient build()+
@InterfaceAudience.Public + @InterfaceStability.Unstable +public class AsyncKuduClient +extends Object +implements AutoCloseable+
+ A single Kudu client instance corresponds to a single remote Kudu cluster,
+ and can be used to read or write any number of tables within that cluster.
+ An application should use exactly one Kudu client instance per distinct Kudu
+ cluster it connects to.
+
+ In rare cases where a single application needs multiple instances connected
+ to the same cluster, or when many applications each using one or more Kudu
+ client instances are running on the same machine, it may be necessary to
+ adjust the instances to use less resources. See the options in
+ AsyncKuduClient.AsyncKuduClientBuilder
.
+
+
AsyncKuduClient
instance may
+ be created using the AsyncKuduClient.AsyncKuduClientBuilder
class. If
+ a synchronous API is preferred, KuduClient.KuduClientBuilder
may be
+ used instead. See the documentation on these classes for more details on
+ client configuration options.
+
+ Subject
+ instance, and associate the Subject with the current thread of execution.
+ The Kudu client then accesses the Kerberos credentials in the
+ Subject
and uses them to authenticate to the
+ remote cluster as necessary.
+ + Kerberos credentials are typically obtained in one of two ways: +
+ In the case of the Kudu client, Kudu will automatically look for credentials + in the standard system-configured ticket cache location. No additional code + needs to be written to enable this behavior. +
+ Kudu will automatically detect if the ticket it has obtained from the ticket + cache is about to expire. When that is the case, it will attempt to re-read + the ticket cache to obtain a new ticket with a later expiration time. So, if + an application needs to run for longer than the lifetime of a single ticket, + the user must ensure that the ticket cache is periodically refreshed, for + example by re-running 'kinit' once each day. + +
+ The Kudu client does not provide any utility code to facilitate logging in
+ from a keytab. Instead, applications should invoke the JAAS APIs directly,
+ and then ensure that the resulting Subject
+ instance is associated with the current thread's
+ AccessControlContext
when instantiating the Kudu client
+ instance for the first time. The Subject
instance
+ will be stored and used whenever Kerberos authentication is required.
+
+ Note: if the Kudu client is instantiated with a
+ Subject
as described above, it will not
+ make any attempt to re-login from the keytab. Instead, the application should
+ arrange to periodically re-initiate the login process and update the
+ credentials stored in the same Subject instance as was provided when the
+ client was instantiated.
+
+ The easiest way to authenticate using a keytab is by creating a JAAS config + file such as this:
+ ExampleLoginContextName { + com.sun.security.auth.module.Krb5LoginModule required + useKeyTab = true + keyTab = "/path/to/app.keytab" + principal = "appuser"; + }; ++ This can then be passed to the application by adding
-Djava.security.auth.login.config=/path/to/jaas.conf
to the command when
+ starting it.
+ This authentication method needs to be set in the code as well by wrapping
+ the code interacting with Kudu with a Subject.doAs(javax.security.auth.Subject, java.security.PrivilegedAction<T>)
after creating a login context using the
+ JAAS config, logging in, and passing the Subject
+ to the doAs:
+ + LoginContext login = new LoginContext("ExampleLoginContextName"); + login.login(); + KuduClient c = Subject.doAs(login.getSubject(), + (PrivilegedAction<KuduClient>) () -> { + return myClientBuilder.build(); + }); ++ In this case it's necessary to periodically re-login as needed and run doAs + using the new subject. +
+ In the context of the Hadoop ecosystem, the org.apache.hadoop.security.UserGroupInformation
class provides utility
+ methods to login from a keytab and then run code as the resulting Subject
:
+ UserGroupInformation.loginUserFromKeytab("appuser", "/path/to/app.keytab"); + KuduClient c = UserGroupInformation.getLoginUser().doAs( + new PrivilegedExceptionActionThe() { + @Override + public KuduClient run() throws Exception { + return myClientBuilder.build(); + } + } + ); +
UserGroupInformation
class will also automatically
+ start a thread to periodically re-login from the keytab. It's not necessary
+ to pass a JAAS config.
+
+ org.apache.kudu.client.SecurityContext
slf4j category. Enabling DEBUG
+ logging for this class may help you understand which credentials are being
+ obtained by the Kudu client when it is instantiated. Additionally, if the
+ Java system property kudu.jaas.debug
is set to true
, Kudu
+ will enable the debug
option when configuring Krb5LoginModule
+ when it attempts to log in from a ticket cache. JDK-specific system properties
+ such as sun.security.krb5.debug
may also be useful in troubleshooting
+ Kerberos authentication failures.
+
+ + An authentication token is a time-limited credential which can be obtained by + an application which has already authenticated via Kerberos. The token is + represented by an opaque byte string, and it can be passed from one client to + another to transfer credentials. +
+ A token may be generated using the
+ exportAuthenticationCredentials()
API, and then
+ imported to another client using
+ importAuthenticationCredentials(byte[])
.
+
+
public
visibility, the
+ method is not part of the public API and there is no guarantee that its
+ existence or behavior will be maintained in subsequent versions of the Kudu
+ client library.
+
+ Other APIs are annotated with the InterfaceStability.Unstable annotation.
+ These APIs are meant for public consumption but may change between minor releases.
+ Note that the asynchronous client is currently considered unstable.
+
+ AsyncKuduSession
nor its synchronous wrapper KuduSession
is
+ thread-safe. Refer to the documentation for each individual class for more
+ details.
+
+ Deferred
instance to which you can attach a Callback
chain
+ that will execute when the asynchronous operation completes.
+
+ The asynchronous calls themselves typically do not throw exceptions. Instead,
+ an errback
should be attached which will be called with the Exception
+ that occurred.
Modifier and Type | +Class and Description | +
---|---|
static class |
+AsyncKuduClient.AsyncKuduClientBuilder
+Builder class to use in order to connect to Kudu.
+ |
+
Modifier and Type | +Field and Description | +
---|---|
static long |
+DEFAULT_KEEP_ALIVE_PERIOD_MS |
+
static long |
+DEFAULT_NEGOTIATION_TIMEOUT_MS |
+
static long |
+DEFAULT_OPERATION_TIMEOUT_MS |
+
static byte[] |
+EMPTY_ARRAY |
+
static long |
+INVALID_TXN_ID |
+
static org.slf4j.Logger |
+LOG |
+
static int |
+NO_SOFT_DELETED_STATE_RESERVED_SECONDS |
+
static long |
+NO_TIMESTAMP |
+
static int |
+SLEEP_TIME |
+
Modifier and Type | +Method and Description | +
---|---|
com.stumbleupon.async.Deferred<AlterTableResponse> |
+alterTable(String name,
+ AlterTableOptions ato)
+Alter a table on the cluster as specified by the builder.
+ |
+
void |
+close()
+Invokes
+shutdown() and waits. |
+
com.stumbleupon.async.Deferred<KuduTable> |
+createTable(String name,
+ Schema schema,
+ CreateTableOptions builder)
+Create a table on the cluster with the specified name, schema, and table configurations.
+ |
+
com.stumbleupon.async.Deferred<DeleteTableResponse> |
+deleteTable(String name)
+Delete a table with the specified name.
+ |
+
com.stumbleupon.async.Deferred<DeleteTableResponse> |
+deleteTable(String name,
+ int reserveSeconds)
+Delete a table with the specified name.
+ |
+
com.stumbleupon.async.Deferred<byte[]> |
+exportAuthenticationCredentials()
+Export serialized authentication data that may be passed to a different
+ client instance and imported to provide that client the ability to connect
+ to the cluster.
+ |
+
String |
+getClusterId()
+Returns the ID of the cluster that this client is connected to.
+ |
+
long |
+getDefaultAdminOperationTimeoutMs()
+Get the timeout used for admin operations.
+ |
+
long |
+getDefaultOperationTimeoutMs()
+Get the timeout used for operations on sessions and scanners.
+ |
+
long |
+getDefaultSocketReadTimeoutMs()
+Deprecated.
+
+socket read timeouts are no longer used
+ |
+
long |
+getLastPropagatedTimestamp()
+Returns the last timestamp received from a server.
+ |
+
String |
+getLocationString()
+Returns a string representation of this client's location.
+ |
+
String |
+getMasterAddressesAsString() |
+
com.stumbleupon.async.Deferred<ListTablesResponse> |
+getSoftDeletedTablesList()
+Get the list of all the soft deleted tables.
+ |
+
Statistics |
+getStatistics()
+Get the statistics object of this client.
+ |
+
com.stumbleupon.async.Deferred<ListTablesResponse> |
+getTablesList()
+Get the list of all the regular (i.e.
+ |
+
com.stumbleupon.async.Deferred<ListTablesResponse> |
+getTablesList(String nameFilter)
+Get a list of regular table names.
+ |
+
com.stumbleupon.async.Deferred<ListTablesResponse> |
+getTablesList(String nameFilter,
+ boolean showSoftDeleted)
+Get a list of table names.
+ |
+
com.stumbleupon.async.Deferred<KuduTableStatistics> |
+getTableStatistics(String name)
+Get table's statistics from master.
+ |
+
boolean |
+hasLastPropagatedTimestamp()
+Checks if the client received any timestamps from a server.
+ |
+
void |
+importAuthenticationCredentials(byte[] authnData)
+Import data allowing this client to authenticate to the cluster.
+ |
+
com.stumbleupon.async.Deferred<IsAlterTableDoneResponse> |
+isAlterTableDone(String name)
+Check whether a previously issued alterTable() is done.
+ |
+
com.stumbleupon.async.Deferred<IsCreateTableDoneResponse> |
+isCreateTableDone(String name)
+Check whether a previously issued createTable() is done.
+ |
+
boolean |
+isStatisticsEnabled()
+Check if statistics collection is enabled for this client.
+ |
+
void |
+jwt(String jwt)
+Set JWT (JSON Web Token) to authenticate the client to a server.
+ |
+
com.stumbleupon.async.Deferred<ListTabletServersResponse> |
+listTabletServers()
+Get the list of running tablet servers.
+ |
+
AsyncKuduScanner.AsyncKuduScannerBuilder |
+newScannerBuilder(KuduTable table)
+Creates a new
+AsyncKuduScanner.AsyncKuduScannerBuilder for a particular table. |
+
AsyncKuduSession |
+newSession()
+Create a new session for interacting with the cluster.
+ |
+
com.stumbleupon.async.Deferred<KuduTable> |
+openTable(String name)
+Open the table with the given name.
+ |
+
com.stumbleupon.async.Deferred<RecallDeletedTableResponse> |
+recallDeletedTable(String id)
+Recall a soft-deleted table on the cluster with the specified id
+ |
+
com.stumbleupon.async.Deferred<RecallDeletedTableResponse> |
+recallDeletedTable(String id,
+ String newTableName)
+Recall a soft-deleted table on the cluster with the specified id
+ |
+
com.stumbleupon.async.Deferred<ArrayList<Void>> |
+shutdown()
+Performs a graceful shutdown of this instance.
+ |
+
KuduClient |
+syncClient()
+Returns a synchronous
+KuduClient which wraps this asynchronous client. |
+
com.stumbleupon.async.Deferred<Boolean> |
+tableExists(String name)
+Test if a table exists.
+ |
+
void |
+trustedCertificates(List<com.google.protobuf.ByteString> certificates)
+Mark the given CA certificates (in DER format) as the trusted ones for the
+ client.
+ |
+
void |
+updateLastPropagatedTimestamp(long lastPropagatedTimestamp)
+Updates the last timestamp received from a server.
+ |
+
public static final org.slf4j.Logger LOG+
public static final int SLEEP_TIME+
public static final byte[] EMPTY_ARRAY+
public static final long NO_TIMESTAMP+
public static final long INVALID_TXN_ID+
public static final long DEFAULT_OPERATION_TIMEOUT_MS+
public static final int NO_SOFT_DELETED_STATE_RESERVED_SECONDS+
public static final long DEFAULT_KEEP_ALIVE_PERIOD_MS+
public static final long DEFAULT_NEGOTIATION_TIMEOUT_MS+
public void updateLastPropagatedTimestamp(long lastPropagatedTimestamp)+
lastPropagatedTimestamp
- the last timestamp received from a serverpublic long getLastPropagatedTimestamp()+
public boolean hasLastPropagatedTimestamp()+
public String getLocationString()+
public String getClusterId()+
public KuduClient syncClient()+
KuduClient
which wraps this asynchronous client.
+ Calling KuduClient.close()
on the returned client will close this client.
+ If this asynchronous client should outlive the returned synchronous client,
+ then do not close the synchronous client.KuduClient
public com.stumbleupon.async.Deferred<KuduTable> createTable(String name, + Schema schema, + CreateTableOptions builder)+
NonRecoverableException
name
- the table's nameschema
- the table's schemabuilder
- a builder containing the table's configurationspublic com.stumbleupon.async.Deferred<IsCreateTableDoneResponse> isCreateTableDone(String name)+
name
- table's namepublic com.stumbleupon.async.Deferred<DeleteTableResponse> deleteTable(String name, + int reserveSeconds)+
name
- the table's namereserveSeconds
- the soft deleted table to be alive timepublic com.stumbleupon.async.Deferred<DeleteTableResponse> deleteTable(String name)+
name
- the table's namepublic com.stumbleupon.async.Deferred<RecallDeletedTableResponse> recallDeletedTable(String id)+
id
- the table's idpublic com.stumbleupon.async.Deferred<RecallDeletedTableResponse> recallDeletedTable(String id, + String newTableName)+
id
- the table's idnewTableName
- the table's new name after recallpublic com.stumbleupon.async.Deferred<AlterTableResponse> alterTable(String name, + AlterTableOptions ato)+
name
- the table's name (old name if the table is being renamed)ato
- the alter table optionspublic com.stumbleupon.async.Deferred<IsAlterTableDoneResponse> isAlterTableDone(String name)+
name
- table namepublic com.stumbleupon.async.Deferred<ListTabletServersResponse> listTabletServers()+
public com.stumbleupon.async.Deferred<ListTablesResponse> getTablesList()+
public com.stumbleupon.async.Deferred<ListTablesResponse> getTablesList(String nameFilter)+
nameFilter
- an optional table name filterpublic com.stumbleupon.async.Deferred<ListTablesResponse> getTablesList(String nameFilter, + boolean showSoftDeleted)+
nameFilter
- an optional table name filtershowSoftDeleted
- whether to display only regular (i.e. not soft deleted)
+ tables or all tables (i.e. soft deleted tables and regular tables)public com.stumbleupon.async.Deferred<ListTablesResponse> getSoftDeletedTablesList()+
public com.stumbleupon.async.Deferred<KuduTableStatistics> getTableStatistics(String name)+
name
- the table's namepublic com.stumbleupon.async.Deferred<Boolean> tableExists(String name)+
name
- a non-null table namepublic com.stumbleupon.async.Deferred<KuduTable> openTable(String name)+
name
- table to open@InterfaceStability.Unstable +public com.stumbleupon.async.Deferred<byte[]> exportAuthenticationCredentials()+
@InterfaceStability.Unstable +public void importAuthenticationCredentials(byte[] authnData)+
authnData
- then authentication data provided by a prior call to
+ exportAuthenticationCredentials()
@InterfaceStability.Unstable +public void trustedCertificates(List<com.google.protobuf.ByteString> certificates) + throws CertificateException+
certificates
- list of certificates to trust (in DER format)CertificateException
- if any of the specified certificates were invalid@InterfaceStability.Unstable +public void jwt(String jwt)+
jwt
- The JSON web token to set.public long getDefaultOperationTimeoutMs()+
public long getDefaultAdminOperationTimeoutMs()+
@Deprecated +public long getDefaultSocketReadTimeoutMs()+
public String getMasterAddressesAsString()+
public boolean isStatisticsEnabled()+
public Statistics getStatistics()+
IllegalStateException
- thrown if statistics collection has been disabledpublic AsyncKuduScanner.AsyncKuduScannerBuilder newScannerBuilder(KuduTable table)+
AsyncKuduScanner.AsyncKuduScannerBuilder
for a particular table.table
- the name of the table you intend to scan.
+ The string is assumed to use the platform's default charset.public AsyncKuduSession newSession()+
public void close() + throws Exception+
shutdown()
and waits. This method returns void, so consider invoking
+ shutdown()
directly if there's a need to handle dangling RPCs.close
in interface AutoCloseable
Exception
- if an error happens while closing the connectionspublic com.stumbleupon.async.Deferred<ArrayList<Void>> shutdown()+
+
Flushes
all buffered edits.Deferred
, whose callback chain will be invoked once all
+ of the above have been done. If this callback chain doesn't fail, then
+ the clean shutdown will be successful, and all the data will be safe on
+ the Kudu side. In case of a failure (the "errback" is invoked) you will have
+ to open a new AsyncKuduClient if you want to retry those operations.
+ The Deferred doesn't actually hold any content.@InterfaceAudience.Public + @InterfaceStability.Evolving +public static class AsyncKuduScanner.AsyncKuduScannerBuilder +extends AbstractKuduScannerBuilder<AsyncKuduScanner.AsyncKuduScannerBuilder,AsyncKuduScanner>+
AsyncKuduScanner
.
+ Use AsyncKuduClient.newScannerBuilder(org.apache.kudu.client.KuduTable)
in order to get a builder instance.Modifier and Type | +Method and Description | +
---|---|
AsyncKuduScanner |
+build()
+Builds an
+AsyncKuduScanner using the passed configurations. |
+
addColumnRangePredicate, addColumnRangePredicatesRaw, addPredicate, batchSizeBytes, cacheBlocks, exclusiveUpperBound, exclusiveUpperBoundRaw, keepAlivePeriodMs, limit, lowerBound, lowerBoundRaw, prefetching, readMode, replicaSelection, scanRequestTimeout, setFaultTolerant, setProjectedColumnIndexes, setProjectedColumnNames, snapshotTimestampMicros
public AsyncKuduScanner build()+
AsyncKuduScanner
using the passed configurations.build
in class AbstractKuduScannerBuilder<AsyncKuduScanner.AsyncKuduScannerBuilder,AsyncKuduScanner>
AsyncKuduScanner
@InterfaceAudience.Public + @InterfaceStability.Evolving +public static enum AsyncKuduScanner.ReadMode +extends Enum<AsyncKuduScanner.ReadMode>+
Enum Constant and Description | +
---|
READ_AT_SNAPSHOT
+When READ_AT_SNAPSHOT is specified the server will attempt to perform a read
+ at the provided timestamp.
+ |
+
READ_LATEST
+When READ_LATEST is specified the server will always return committed writes at
+ the time the request was received.
+ |
+
READ_YOUR_WRITES
+When @c READ_YOUR_WRITES is specified, the client will perform a read
+ such that it follows all previously known writes and reads from this client.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static AsyncKuduScanner.ReadMode |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static AsyncKuduScanner.ReadMode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final AsyncKuduScanner.ReadMode READ_LATEST+
public static final AsyncKuduScanner.ReadMode READ_AT_SNAPSHOT+
public static final AsyncKuduScanner.ReadMode READ_YOUR_WRITES+
public static AsyncKuduScanner.ReadMode[] values()+
+for (AsyncKuduScanner.ReadMode c : AsyncKuduScanner.ReadMode.values()) + System.out.println(c); +
public static AsyncKuduScanner.ReadMode valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@InterfaceAudience.Public + @InterfaceStability.Evolving +public static enum AsyncKuduScanner.RowDataFormat +extends Enum<AsyncKuduScanner.RowDataFormat>+
RowResult
and RowResultIterator
interfaces so it's transparent to
+ application code.Enum Constant and Description | +
---|
COLUMNAR
+Server is expected to return scanner result data in columnar layout.
+ |
+
ROWWISE
+Server is expected to return scanner result data in row-wise layout.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static AsyncKuduScanner.RowDataFormat |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static AsyncKuduScanner.RowDataFormat[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final AsyncKuduScanner.RowDataFormat ROWWISE+
public static final AsyncKuduScanner.RowDataFormat COLUMNAR+
public static AsyncKuduScanner.RowDataFormat[] values()+
+for (AsyncKuduScanner.RowDataFormat c : AsyncKuduScanner.RowDataFormat.values()) + System.out.println(c); +
public static AsyncKuduScanner.RowDataFormat valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@InterfaceAudience.Public + @InterfaceStability.Unstable +public final class AsyncKuduScanner +extends Object+
+ This class is not synchronized as it's expected to be
+ used from a single thread at a time. It's rarely (if ever?) useful to
+ scan concurrently from a shared scanner using multiple threads. If you
+ want to optimize large table scans using extra parallelism, create a few
+ scanners through the KuduScanToken
API. Or use MapReduce.
+
+ There's no method in this class to explicitly open the scanner. It will open
+ itself automatically when you start scanning by calling nextRows()
.
+ Also, the scanner will automatically call close()
when it reaches the
+ end key. If, however, you would like to stop scanning before reaching the
+ end key, you must call close()
before disposing of the scanner.
+ Note that it's always safe to call close()
on a scanner.
+
+ A AsyncKuduScanner
is not re-usable. Should you want to scan the same rows
+ or the same table again, you must create a new one.
+
+
byte
arrays in argumentbyte[]
in argument will copy it.
+ For more info, please refer to the documentation of KuduRpc
.
+ String
s in argumentModifier and Type | +Class and Description | +
---|---|
static class |
+AsyncKuduScanner.AsyncKuduScannerBuilder
+A Builder class to build
+AsyncKuduScanner . |
+
static class |
+AsyncKuduScanner.ReadMode
+The possible read modes for scanners.
+ |
+
static class |
+AsyncKuduScanner.RowDataFormat
+Expected row data format in scanner result set.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
com.stumbleupon.async.Deferred<RowResultIterator> |
+close()
+Closes this scanner (don't forget to call this when you're done with it!).
+ |
+
long |
+getBatchSizeBytes()
+Returns the maximum number of bytes returned by the scanner, on each batch.
+ |
+
boolean |
+getCacheBlocks()
+Returns if this scanner was configured to cache data blocks or not.
+ |
+
long |
+getKeepAlivePeriodMs() |
+
long |
+getLimit()
+Returns the maximum number of rows that this scanner was configured to return.
+ |
+
Schema |
+getProjectionSchema()
+Returns the projection schema of this scanner.
+ |
+
AsyncKuduScanner.ReadMode |
+getReadMode()
+Returns the ReadMode for this scanner.
+ |
+
ResourceMetrics |
+getResourceMetrics()
+Returns the
+ResourceMetrics for this scanner. |
+
long |
+getScanRequestTimeout()
+Returns the scan request timeout for this scanner.
+ |
+
String |
+getTsUUID() |
+
boolean |
+hasMoreRows()
+Tells if there is data to scan, including both rpc or cached rpc result.
+ |
+
boolean |
+isClosed() |
+
com.stumbleupon.async.Deferred<Void> |
+keepAlive()
+Keep the current remote scanner alive.
+ |
+
com.stumbleupon.async.Deferred<RowResultIterator> |
+nextRows()
+Scans a number of rows.
+ |
+
void |
+setReuseRowResult(boolean reuseRowResult)
+If set to true, the
+RowResult object returned by the RowResultIterator
+ will be reused with each call to Iterator.next() . |
+
void |
+setRowDataFormat(AsyncKuduScanner.RowDataFormat rowDataFormat)
+Optionally set expected row data format.
+ |
+
String |
+toString() |
+
public long getLimit()+
public boolean hasMoreRows()+
public boolean getCacheBlocks()+
public long getBatchSizeBytes()+
public AsyncKuduScanner.ReadMode getReadMode()+
public long getScanRequestTimeout()+
public Schema getProjectionSchema()+
public long getKeepAlivePeriodMs()+
public ResourceMetrics getResourceMetrics()+
ResourceMetrics
for this scanner. These metrics are
+ updated with each batch of rows returned from the server.public void setReuseRowResult(boolean reuseRowResult)+
RowResult
object returned by the RowResultIterator
+ will be reused with each call to Iterator.next()
.
+ This can be a useful optimization to reduce the number of objects created.
+
+ Note: DO NOT use this if the RowResult is stored between calls to next().
+ Enabling this optimization means that a call to next() mutates the previously returned
+ RowResult. Accessing the previously returned RowResult after a call to next(), by storing all
+ RowResults in a collection and accessing them later for example, will lead to all of the
+ stored RowResults being mutated as per the data in the last RowResult returned.public void setRowDataFormat(AsyncKuduScanner.RowDataFormat rowDataFormat)+
rowDataFormat
- Row data format to be expected.public String getTsUUID()+
public com.stumbleupon.async.Deferred<RowResultIterator> nextRows()+
+ Once this method returns null
once (which indicates that this
+ Scanner
is done scanning), calling it again leads to an undefined
+ behavior.
public boolean isClosed()+
public com.stumbleupon.async.Deferred<RowResultIterator> close()+
+ Closing a scanner already closed has no effect. The deferred returned + will be called back immediately.
Object
can be null, a RowResultIterator if there was data left
+ in the scanner, or an Exception.public com.stumbleupon.async.Deferred<Void> keepAlive()+
+ Keep the current remote scanner alive on the Tablet server for an + additional time-to-live. This is useful if the interval in between + nextRows() calls is big enough that the remote scanner might be garbage + collected. The scanner time-to-live can be configured on the tablet + server via the --scanner_ttl_ms configuration flag and has a default + of 60 seconds. +
+ This does not invalidate any previously fetched results. +
+ Note that an error returned by this method should not be taken as indication + that the scan has failed. Subsequent calls to nextRows() might still be successful, + particularly if the scanner is configured to be fault tolerant.
IllegalStateException
- if the scanner is already closed.@InterfaceAudience.Public + @InterfaceStability.Unstable + @NotThreadSafe +public class AsyncKuduSession +extends Object +implements SessionConfiguration+
AsyncKuduSession
belongs to a specific AsyncKuduClient
, and represents a
+ context in which all write data access should take place. Within a session,
+ multiple operations may be accumulated and batched together for better
+ efficiency. Settings like timeouts, priorities, and trace IDs are also set
+ per session.
+
+ AsyncKuduSession
is separate from AsyncKuduClient
because, in a multi-threaded
+ application, different threads may need to concurrently execute
+ transactions. Similar to a JDBC "session", transaction boundaries will be
+ delineated on a per-session basis -- in between a "BeginTransaction" and
+ "Commit" call on a given session, all operations will be part of the same
+ transaction. Meanwhile another concurrent session object can safely run
+ non-transactional work or other transactions without interfering.
+
+
Therefore, this class is not thread-safe. + +
Additionally, there is a guarantee that writes from different sessions do not
+ get batched together into the same RPCs -- this means that latency-sensitive
+ clients can run through the same AsyncKuduClient
object as throughput-oriented
+ clients, perhaps by setting the latency-sensitive session's timeouts low and
+ priorities high. Without the separation of batches, a latency-sensitive
+ single-row insert might get batched along with 10MB worth of inserts from the
+ batch writer, thus delaying the response significantly.
+
+
Timeouts are handled differently depending on the flush mode.
+ With AUTO_FLUSH_SYNC
, the timeout is set
+ on each apply()'d operation.
+ With AUTO_FLUSH_BACKGROUND
and
+ MANUAL_FLUSH
, the timeout is assigned to a
+ whole batch of operations upon flush()'ing. It means that in a situation
+ with a timeout of 500ms and a flush interval of 1000ms, an operation can be outstanding for up to
+ 1500ms before being timed out.
+
+
Warning: a note on out-of-order operations + +
When using AsyncKuduSession
, it is not difficult to trigger concurrent flushes on
+ the same session. The result is that operations applied in a particular order within a single
+ session may be applied in a different order on the server side, even for a single tablet. To
+ prevent this behavior, ensure that only one flush is outstanding at a given time (the maximum
+ concurrent flushes per AsyncKuduSession
is hard-coded to 2).
+
+
If operation interleaving would be unacceptable for your application, consider using one of + the following strategies to avoid it: + +
MANUAL_FLUSH
mode,
+ wait for one flush()
to join()
before triggering another flush.
+ AUTO_FLUSH_SYNC
+ mode, wait for each apply()
to join()
before applying another operation.
+ AUTO_FLUSH_BACKGROUND
mode.
+ Operation
on a particular row until any previous write to that
+ row has been successfully flushed.
+ For more information on per-session operation interleaving, see + KUDU-1767.
SessionConfiguration.FlushMode
Modifier and Type | +Field and Description | +
---|---|
static org.slf4j.Logger |
+LOG |
+
Modifier and Type | +Method and Description | +
---|---|
com.stumbleupon.async.Deferred<OperationResponse> |
+apply(Operation operation)
+Apply the given operation.
+ |
+
com.stumbleupon.async.Deferred<List<OperationResponse>> |
+close()
+Flushes the buffered operations and marks this session as closed.
+ |
+
int |
+countPendingErrors()
+Return the number of errors which are pending.
+ |
+
com.stumbleupon.async.Deferred<List<OperationResponse>> |
+flush()
+Flush buffered writes.
+ |
+
SessionConfiguration.FlushMode |
+getFlushMode()
+Get the current flush mode.
+ |
+
RowErrorsAndOverflowStatus |
+getPendingErrors()
+Return any errors from previous calls.
+ |
+
long |
+getTimeoutMillis()
+Get the current timeout.
+ |
+
ResourceMetrics |
+getWriteOpMetrics()
+Return cumulative write operation metrics since the beginning of the session.
+ |
+
boolean |
+hasPendingOperations()
+Check if there are operations that haven't been completely applied.
+ |
+
boolean |
+isClosed()
+Returns true if this session has already been closed.
+ |
+
boolean |
+isIgnoreAllDuplicateRows()
+Tells if the session is currently ignoring row errors when the whole list returned by a tablet
+ server is of the AlreadyPresent type.
+ |
+
boolean |
+isIgnoreAllNotFoundRows()
+Tells if the session is currently ignoring row errors when the whole list returned by a tablet
+ server is of the NotFound type.
+ |
+
void |
+setErrorCollectorSpace(int size)
+Set the number of errors that can be collected.
+ |
+
void |
+setExternalConsistencyMode(ExternalConsistencyMode consistencyMode)
+Set the new external consistency mode for this session.
+ |
+
void |
+setFlushInterval(int flushIntervalMillis)
+Set the flush interval, which will be used for the next scheduling decision.
+ |
+
void |
+setFlushMode(SessionConfiguration.FlushMode flushMode)
+Set the new flush mode for this session.
+ |
+
void |
+setIgnoreAllDuplicateRows(boolean ignoreAllDuplicateRows)
+Configures the option to ignore all the row errors if they are all of the AlreadyPresent type.
+ |
+
void |
+setIgnoreAllNotFoundRows(boolean ignoreAllNotFoundRows)
+Configures the option to ignore all the row errors if they are all of the NotFound type.
+ |
+
void |
+setMutationBufferLowWatermark(float mutationBufferLowWatermarkPercentage)
+Deprecated.
+ |
+
void |
+setMutationBufferSpace(int numOps)
+Set the number of operations that can be buffered.
+ |
+
void |
+setTimeoutMillis(long timeout)
+Sets the timeout for the next applied operations.
+ |
+
public SessionConfiguration.FlushMode getFlushMode()+
SessionConfiguration
getFlushMode
in interface SessionConfiguration
AUTO_FLUSH_SYNC
by defaultpublic void setFlushMode(SessionConfiguration.FlushMode flushMode)+
SessionConfiguration
setFlushMode
in interface SessionConfiguration
flushMode
- new flush mode, can be the same as the previous one.public void setExternalConsistencyMode(ExternalConsistencyMode consistencyMode)+
SessionConfiguration
setExternalConsistencyMode
in interface SessionConfiguration
consistencyMode
- new external consistency mode, can the same as the previous one.public void setMutationBufferSpace(int numOps)+
SessionConfiguration
setMutationBufferSpace
in interface SessionConfiguration
numOps
- number of ops.public void setErrorCollectorSpace(int size)+
SessionConfiguration
setErrorCollectorSpace
in interface SessionConfiguration
size
- number of errors.@Deprecated +public void setMutationBufferLowWatermark(float mutationBufferLowWatermarkPercentage)+
SessionConfiguration
setMutationBufferLowWatermark
in interface SessionConfiguration
mutationBufferLowWatermarkPercentage
- a new low watermark as a percentage,
+ has to be between 0 and 1 (inclusive). A value of 1 disables
+ the low watermark since it's the same as the high onepublic void setFlushInterval(int flushIntervalMillis)+
SessionConfiguration
setFlushInterval
in interface SessionConfiguration
flushIntervalMillis
- interval in milliseconds.public void setTimeoutMillis(long timeout)+
SessionConfiguration
setTimeoutMillis
in interface SessionConfiguration
timeout
- Timeout in milliseconds.public long getTimeoutMillis()+
SessionConfiguration
getTimeoutMillis
in interface SessionConfiguration
public boolean isClosed()+
SessionConfiguration
isClosed
in interface SessionConfiguration
public boolean isIgnoreAllDuplicateRows()+
SessionConfiguration
isIgnoreAllDuplicateRows
in interface SessionConfiguration
public void setIgnoreAllDuplicateRows(boolean ignoreAllDuplicateRows)+
SessionConfiguration
Disabled by default.
setIgnoreAllDuplicateRows
in interface SessionConfiguration
ignoreAllDuplicateRows
- true if this session should enforce this, else falsepublic boolean isIgnoreAllNotFoundRows()+
SessionConfiguration
isIgnoreAllNotFoundRows
in interface SessionConfiguration
public void setIgnoreAllNotFoundRows(boolean ignoreAllNotFoundRows)+
SessionConfiguration
Disabled by default.
setIgnoreAllNotFoundRows
in interface SessionConfiguration
ignoreAllNotFoundRows
- true if this session should enforce this, else falsepublic int countPendingErrors()+
SessionConfiguration
AUTO_FLUSH_BACKGROUND
mode.countPendingErrors
in interface SessionConfiguration
public RowErrorsAndOverflowStatus getPendingErrors()+
SessionConfiguration
Clears the pending errors.
getPendingErrors
in interface SessionConfiguration
public ResourceMetrics getWriteOpMetrics()+
SessionConfiguration
getWriteOpMetrics
in interface SessionConfiguration
public com.stumbleupon.async.Deferred<List<OperationResponse>> close()+
flush()
on how to deal with exceptions coming out of this method.public com.stumbleupon.async.Deferred<List<OperationResponse>> flush()+
Deferred
whose callback chain will be invoked when all applied operations at
+ the time of the call have been flushed.public boolean hasPendingOperations()+
SessionConfiguration
hasPendingOperations
in interface SessionConfiguration
public com.stumbleupon.async.Deferred<OperationResponse> apply(Operation operation) + throws KuduException+
+ The behavior of this method depends on the configured
+ FlushMode
. Regardless
+ of flush mode, however, apply()
may begin to perform processing in the background
+ for the call (e.g looking up the tablet location, etc).
operation
- operation to applyKuduException
- if an error happens or PleaseThrottleException
is triggeredFlushMode
KuduPredicate
class instead.@InterfaceAudience.Public + @Deprecated +public class ColumnRangePredicate +extends Object+
Constructor and Description | +
---|
ColumnRangePredicate(ColumnSchema column)
+Deprecated.
+Create the predicate on the specified column
+ |
+
Modifier and Type | +Method and Description | +
---|---|
ColumnSchema |
+getColumn()
+Deprecated.
+Get the column used by this predicate
+ |
+
byte[] |
+getLowerBound()
+Deprecated.
+Get the lower bound in its raw representation
+ |
+
byte[] |
+getUpperBound()
+Deprecated.
+Get the upper bound in its raw representation
+ |
+
void |
+setLowerBound(BigDecimal lowerBound)
+Deprecated.
+Set a BigDecimal for the lower bound
+ |
+
void |
+setLowerBound(boolean lowerBound)
+Deprecated.
+Set a boolean for the lower bound
+ |
+
void |
+setLowerBound(byte lowerBound)
+Deprecated.
+Set a byte for the lower bound
+ |
+
void |
+setLowerBound(byte[] lowerBound)
+Deprecated.
+Set a binary value for the lower bound
+ |
+
void |
+setLowerBound(double lowerBound)
+Deprecated.
+Set a double for the lower bound
+ |
+
void |
+setLowerBound(float lowerBound)
+Deprecated.
+Set a float for the lower bound
+ |
+
void |
+setLowerBound(int lowerBound)
+Deprecated.
+Set an int for the lower bound
+ |
+
void |
+setLowerBound(long lowerBound)
+Deprecated.
+Set a long for the lower bound
+
+ If 'lowerBound' is a timestamp see
+PartialRow.addLong(String, long) for the
+ format. |
+
void |
+setLowerBound(short lowerBound)
+Deprecated.
+Set a short for the lower bound
+ |
+
void |
+setLowerBound(String lowerBound)
+Deprecated.
+Set a string for the lower bound
+ |
+
void |
+setUpperBound(BigDecimal upperBound)
+Deprecated.
+Set a BigDecimal for the upper bound
+ |
+
void |
+setUpperBound(boolean upperBound)
+Deprecated.
+Set a boolean for the upper bound
+ |
+
void |
+setUpperBound(byte upperBound)
+Deprecated.
+Set a byte for the upper bound
+ |
+
void |
+setUpperBound(byte[] upperBound)
+Deprecated.
+Set a binary value for the upper bound
+ |
+
void |
+setUpperBound(double upperBound)
+Deprecated.
+Set a double for the upper bound
+ |
+
void |
+setUpperBound(float upperBound)
+Deprecated.
+Set a float for the upper bound
+ |
+
void |
+setUpperBound(int upperBound)
+Deprecated.
+Set an int for the upper bound
+ |
+
void |
+setUpperBound(long upperBound)
+Deprecated.
+Set a long for the upper bound
+
+ If 'upperBound' is a timestamp see
+PartialRow.addLong(String, long) for the
+ format. |
+
void |
+setUpperBound(short upperBound)
+Deprecated.
+Set a short for the upper bound
+ |
+
void |
+setUpperBound(String upperBound)
+Deprecated.
+Set a string for the upper bound
+ |
+
static byte[] |
+toByteArray(List<ColumnRangePredicate> predicates)
+Deprecated.
+Converts a list of predicates into an opaque byte array.
+ |
+
KuduPredicate |
+toKuduPredicate()
+Deprecated.
+Convert this column range predicate into a
+KuduPredicate . |
+
public ColumnRangePredicate(ColumnSchema column)+
column
- public KuduPredicate toKuduPredicate()+
KuduPredicate
.public void setLowerBound(boolean lowerBound)+
lowerBound
- value for the lower boundpublic void setLowerBound(byte lowerBound)+
lowerBound
- value for the lower boundpublic void setLowerBound(short lowerBound)+
lowerBound
- value for the lower boundpublic void setLowerBound(int lowerBound)+
lowerBound
- value for the lower boundpublic void setLowerBound(long lowerBound)+
PartialRow.addLong(String, long)
for the
+ format.lowerBound
- value for the lower boundpublic void setLowerBound(String lowerBound)+
lowerBound
- value for the lower boundpublic void setLowerBound(byte[] lowerBound)+
lowerBound
- value for the lower boundpublic void setLowerBound(float lowerBound)+
lowerBound
- value for the lower boundpublic void setLowerBound(double lowerBound)+
lowerBound
- value for the lower boundpublic void setLowerBound(BigDecimal lowerBound)+
lowerBound
- value for the lower boundpublic void setUpperBound(boolean upperBound)+
upperBound
- value for the upper boundpublic void setUpperBound(byte upperBound)+
upperBound
- value for the upper boundpublic void setUpperBound(short upperBound)+
upperBound
- value for the upper boundpublic void setUpperBound(int upperBound)+
upperBound
- value for the upper boundpublic void setUpperBound(long upperBound)+
PartialRow.addLong(String, long)
for the
+ format.upperBound
- value for the upper boundpublic void setUpperBound(String upperBound)+
upperBound
- value for the upper boundpublic void setUpperBound(byte[] upperBound)+
upperBound
- value for the upper boundpublic void setUpperBound(float upperBound)+
upperBound
- value for the upper boundpublic void setUpperBound(double upperBound)+
upperBound
- value for the upper boundpublic void setUpperBound(BigDecimal upperBound)+
upperBound
- value for the upper boundpublic ColumnSchema getColumn()+
public byte[] getLowerBound()+
public byte[] getUpperBound()+
public static byte[] toByteArray(List<ColumnRangePredicate> predicates)+
predicates
- a list of predicates@InterfaceAudience.Public + @InterfaceStability.Evolving +public class CreateTableOptions +extends Object+
Constructor and Description | +
---|
CreateTableOptions() |
+
Modifier and Type | +Method and Description | +
---|---|
CreateTableOptions |
+addHashPartitions(List<String> columns,
+ int buckets)
+Add a set of hash partitions to the table.
+ |
+
CreateTableOptions |
+addHashPartitions(List<String> columns,
+ int buckets,
+ int seed)
+Add a set of hash partitions to the table.
+ |
+
CreateTableOptions |
+addRangePartition(PartialRow lower,
+ PartialRow upper)
+Add a range partition to the table with an inclusive lower bound and an
+ exclusive upper bound.
+ |
+
CreateTableOptions |
+addRangePartition(PartialRow lower,
+ PartialRow upper,
+ RangePartitionBound lowerBoundType,
+ RangePartitionBound upperBoundType)
+Add a range partition partition to the table with a lower bound and upper
+ bound.
+ |
+
CreateTableOptions |
+addRangePartition(RangePartitionWithCustomHashSchema rangePartition)
+Add range partition with custom hash schema.
+ |
+
CreateTableOptions |
+addSplitRow(PartialRow row)
+Add a range partition split.
+ |
+
CreateTableOptions |
+setComment(String comment)
+Set the table comment.
+ |
+
CreateTableOptions |
+setDimensionLabel(String dimensionLabel)
+Sets the dimension label for all tablets created at table creation time.
+ |
+
CreateTableOptions |
+setExtraConfigs(Map<String,String> extraConfig)
+Sets the table's extra configuration properties.
+ |
+
CreateTableOptions |
+setNumReplicas(int numReplicas)
+Sets the number of replicas that each tablet will have.
+ |
+
CreateTableOptions |
+setOwner(String owner)
+Set the table owner as the provided username.
+ |
+
CreateTableOptions |
+setRangePartitionColumns(List<String> columns)
+Set the columns on which the table will be range-partitioned.
+ |
+
CreateTableOptions |
+setWait(boolean wait)
+Whether to wait for the table to be fully created before this create
+ operation is considered to be finished.
+ |
+
public CreateTableOptions addHashPartitions(List<String> columns, + int buckets)+
columns
- the columns to hashbuckets
- the number of buckets to hash intopublic CreateTableOptions addHashPartitions(List<String> columns, + int buckets, + int seed)+
columns
- the columns to hashbuckets
- the number of buckets to hash intoseed
- a hash seedpublic CreateTableOptions setRangePartitionColumns(List<String> columns)+
columns
- the range partitioned columnspublic CreateTableOptions addRangePartition(PartialRow lower, + PartialRow upper)+
lower
- the inclusive lower boundupper
- the exclusive upper boundpublic CreateTableOptions addRangePartition(PartialRow lower, + PartialRow upper, + RangePartitionBound lowerBoundType, + RangePartitionBound upperBoundType)+
lower
- the lower boundupper
- the upper boundlowerBoundType
- the type of the lower bound, either inclusive or exclusiveupperBoundType
- the type of the upper bound, either inclusive or exclusivepublic CreateTableOptions addRangePartition(RangePartitionWithCustomHashSchema rangePartition)+
rangePartition
- range partition with custom hash schemapublic CreateTableOptions addSplitRow(PartialRow row)+
row
- a key row for the split pointpublic CreateTableOptions setNumReplicas(int numReplicas)+
numReplicas
- the number of replicas to usepublic CreateTableOptions setDimensionLabel(String dimensionLabel)+
dimensionLabel
- the dimension label for the tablet to be created.public CreateTableOptions setExtraConfigs(Map<String,String> extraConfig)+
extraConfig
- the table's extra configuration propertiespublic CreateTableOptions setWait(boolean wait)+
+ If false, the create will finish quickly, but subsequent row operations + may take longer as they may need to wait for portions of the table to be + fully created. +
+ If true, the create will take longer, but the speed of subsequent row + operations will not be impacted. +
+ If not provided, defaults to true. +
wait
- whether to wait for the table to be fully createdpublic CreateTableOptions setOwner(String owner)+
owner
- the username to set as the table owner.public CreateTableOptions setComment(String comment)+
comment
- the table comment@InterfaceAudience.Public + @InterfaceStability.Evolving +public class Delete +extends Operation+
MASTER_SERVICE_NAME, TABLET_SERVER_SERVICE_NAME, TXN_MANAGER_SERVICE_NAME
getRow, partitionKey, setRow
getExternalConsistencyMode, getTable, setExternalConsistencyMode, setPropagatedTimestamp, toString
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class DeleteIgnore +extends Operation+
MASTER_SERVICE_NAME, TABLET_SERVER_SERVICE_NAME, TXN_MANAGER_SERVICE_NAME
getRow, partitionKey, setRow
getExternalConsistencyMode, getTable, setExternalConsistencyMode, setPropagatedTimestamp, toString
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class DeleteTableResponse +extends Object+
Modifier and Type | +Method and Description | +
---|---|
long |
+getElapsedMillis()
+Get the number of milliseconds elapsed since the RPC was created up to the moment when this
+ response was created.
+ |
+
String |
+getTsUUID()
+Get the identifier of the tablet server that sent the response.
+ |
+
public long getElapsedMillis()+
public String getTsUUID()+
null
if the RPC failed before tablet location lookup succeeded.@InterfaceAudience.Public + @InterfaceStability.Evolving +public enum ExternalConsistencyMode +extends Enum<ExternalConsistencyMode>+
src/kudu/common/common.proto
for a detailed explanations on the
+ meaning and implications of each mode.Enum Constant and Description | +
---|
CLIENT_PROPAGATED |
+
COMMIT_WAIT |
+
Modifier and Type | +Method and Description | +
---|---|
static ExternalConsistencyMode |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ExternalConsistencyMode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final ExternalConsistencyMode CLIENT_PROPAGATED+
public static final ExternalConsistencyMode COMMIT_WAIT+
public static ExternalConsistencyMode[] values()+
+for (ExternalConsistencyMode c : ExternalConsistencyMode.values()) + System.out.println(c); +
public static ExternalConsistencyMode valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@InterfaceAudience.Public
+ @InterfaceStability.Evolving
+public interface HasFailedRpcException
+KuduException
s that can tell you which
+ RPC failed.Modifier and Type | +Method and Description | +
---|---|
org.apache.kudu.client.KuduRpc<?> |
+getFailedRpc()
+Returns the RPC that caused this exception.
+ |
+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class Insert +extends Operation+
MASTER_SERVICE_NAME, TABLET_SERVER_SERVICE_NAME, TXN_MANAGER_SERVICE_NAME
getRow, partitionKey, setRow
getExternalConsistencyMode, getTable, setExternalConsistencyMode, setPropagatedTimestamp, toString
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class InsertIgnore +extends Operation+
MASTER_SERVICE_NAME, TABLET_SERVER_SERVICE_NAME, TXN_MANAGER_SERVICE_NAME
getRow, partitionKey, setRow
getExternalConsistencyMode, getTable, setExternalConsistencyMode, setPropagatedTimestamp, toString
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class IsAlterTableDoneResponse +extends Object+
Modifier and Type | +Method and Description | +
---|---|
long |
+getElapsedMillis()
+Get the number of milliseconds elapsed since the RPC was created up to the moment when this
+ response was created.
+ |
+
String |
+getTsUUID()
+Get the identifier of the tablet server that sent the response.
+ |
+
boolean |
+isDone()
+Tells if the table is done being altered or not.
+ |
+
public boolean isDone()+
public long getElapsedMillis()+
public String getTsUUID()+
null
if the RPC failed before tablet location lookup succeeded.@InterfaceAudience.Public + @InterfaceStability.Evolving +public class IsCreateTableDoneResponse +extends Object+
Modifier and Type | +Method and Description | +
---|---|
long |
+getElapsedMillis()
+Get the number of milliseconds elapsed since the RPC was created up to the moment when this
+ response was created.
+ |
+
String |
+getTsUUID()
+Get the identifier of the tablet server that sent the response.
+ |
+
boolean |
+isDone()
+Returns whether the table is done being created.
+ |
+
public boolean isDone()+
public long getElapsedMillis()+
public String getTsUUID()+
null
if the RPC failed before tablet location lookup succeeded.@InterfaceAudience.Public + @InterfaceStability.Evolving +public static final class KuduClient.KuduClientBuilder +extends Object+
Constructor and Description | +
---|
KuduClientBuilder(List<String> masterAddresses)
+Creates a new builder for a client that will connect to the specified masters.
+ |
+
KuduClientBuilder(String masterAddresses)
+Creates a new builder for a client that will connect to the specified masters.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
KuduClient.KuduClientBuilder |
+bossCount(int bossCount)
+Deprecated.
+
+the bossExecutor is no longer used and will have no effect if provided
+ |
+
KuduClient |
+build()
+Creates a new client that connects to the masters.
+ |
+
KuduClient.KuduClientBuilder |
+connectionNegotiationTimeoutMs(long timeoutMs)
+Sets the default timeout used for connection negotiation.
+ |
+
KuduClient.KuduClientBuilder |
+defaultAdminOperationTimeoutMs(long timeoutMs)
+Sets the default timeout used for administrative operations (e.g.
+ |
+
KuduClient.KuduClientBuilder |
+defaultOperationTimeoutMs(long timeoutMs)
+Sets the default timeout used for user operations (using sessions and scanners).
+ |
+
KuduClient.KuduClientBuilder |
+defaultSocketReadTimeoutMs(long timeoutMs)
+Deprecated.
+
+socket read timeouts are no longer used
+ |
+
KuduClient.KuduClientBuilder |
+disableStatistics()
+Disable this client's collection of statistics.
+ |
+
KuduClient.KuduClientBuilder |
+encryptionPolicy(org.apache.kudu.client.AsyncKuduClient.EncryptionPolicy encryptionPolicy)
+Require encryption for the connection to a remote server.
+ |
+
KuduClient.KuduClientBuilder |
+nioExecutor(Executor workerExecutor)
+Set the executor which will be used for the embedded Netty workers.
+ |
+
KuduClient.KuduClientBuilder |
+nioExecutors(Executor bossExecutor,
+ Executor workerExecutor)
+Deprecated.
+
+the bossExecutor is no longer used and will have no effect if provided
+ |
+
KuduClient.KuduClientBuilder |
+requireAuthentication(boolean requireAuthentication)
+Require authentication for the connection to a remote server.
+ |
+
KuduClient.KuduClientBuilder |
+saslProtocolName(String saslProtocolName)
+Set the SASL protocol name.
+ |
+
KuduClient.KuduClientBuilder |
+workerCount(int workerCount)
+Set the maximum number of worker threads.
+ |
+
public KuduClientBuilder(String masterAddresses)+
masterAddresses
- comma-separated list of "host:port" pairs of the masterspublic KuduClientBuilder(List<String> masterAddresses)+
Here are some examples of recognized formats: +
masterAddresses
- list of master addressespublic KuduClient.KuduClientBuilder defaultAdminOperationTimeoutMs(long timeoutMs)+
timeoutMs
- a timeout in millisecondspublic KuduClient.KuduClientBuilder defaultOperationTimeoutMs(long timeoutMs)+
timeoutMs
- a timeout in millisecondspublic KuduClient.KuduClientBuilder connectionNegotiationTimeoutMs(long timeoutMs)+
timeoutMs
- a timeout in milliseconds@Deprecated +public KuduClient.KuduClientBuilder defaultSocketReadTimeoutMs(long timeoutMs)+
timeoutMs
- a timeout in millisecondspublic KuduClient.KuduClientBuilder disableStatistics()+
@Deprecated +public KuduClient.KuduClientBuilder nioExecutors(Executor bossExecutor, + Executor workerExecutor)+
public KuduClient.KuduClientBuilder nioExecutor(Executor workerExecutor)+
@Deprecated +public KuduClient.KuduClientBuilder bossCount(int bossCount)+
public KuduClient.KuduClientBuilder workerCount(int workerCount)+
public KuduClient.KuduClientBuilder saslProtocolName(String saslProtocolName)+
public KuduClient.KuduClientBuilder requireAuthentication(boolean requireAuthentication)+
public KuduClient.KuduClientBuilder encryptionPolicy(org.apache.kudu.client.AsyncKuduClient.EncryptionPolicy encryptionPolicy)+
public KuduClient build()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class KuduClient +extends Object +implements AutoCloseable+
+ This class acts as a wrapper around AsyncKuduClient
which contains all the relevant
+ documentation.
Modifier and Type | +Class and Description | +
---|---|
static class |
+KuduClient.KuduClientBuilder
+Builder class to use in order to connect to Kudu.
+ |
+
Modifier and Type | +Field and Description | +
---|---|
static long |
+NO_TIMESTAMP |
+
Modifier and Type | +Method and Description | +
---|---|
AlterTableResponse |
+alterTable(String name,
+ AlterTableOptions ato)
+Alter a table on the cluster as specified by the builder.
+ |
+
void |
+close()
+Analogous to
+shutdown() . |
+
KuduTable |
+createTable(String name,
+ Schema schema,
+ CreateTableOptions builder)
+Create a table on the cluster with the specified name, schema, and table configurations.
+ |
+
DeleteTableResponse |
+deleteTable(String name)
+Delete a table on the cluster with the specified name.
+ |
+
DeleteTableResponse |
+deleteTable(String name,
+ int reserveSeconds)
+SoftDelete a table on the cluster with the specified name, the table will be
+ reserved for reserveSeconds before being purged.
+ |
+
byte[] |
+exportAuthenticationCredentials()
+Export serialized authentication data that may be passed to a different
+ client instance and imported to provide that client the ability to connect
+ to the cluster.
+ |
+
String |
+getClusterId()
+Returns the ID of the cluster that this client is connected to.
+ |
+
long |
+getDefaultAdminOperationTimeoutMs()
+Get the timeout used for admin operations.
+ |
+
long |
+getDefaultOperationTimeoutMs()
+Get the timeout used for operations on sessions and scanners.
+ |
+
long |
+getLastPropagatedTimestamp()
+Returns the last timestamp received from a server.
+ |
+
String |
+getLocationString()
+Returns a string representation of this client's location.
+ |
+
String |
+getMasterAddressesAsString() |
+
ListTablesResponse |
+getSoftDeletedTablesList()
+Get the list of all the soft deleted tables.
+ |
+
ListTablesResponse |
+getSoftDeletedTablesList(String nameFilter)
+Get list of soft deleted table names.
+ |
+
Statistics |
+getStatistics()
+Get the statistics object of this client.
+ |
+
ListTablesResponse |
+getTablesList()
+Get the list of all the regular tables.
+ |
+
ListTablesResponse |
+getTablesList(String nameFilter)
+Get a list of regular table names.
+ |
+
KuduTableStatistics |
+getTableStatistics(String name)
+Get table's statistics from master.
+ |
+
boolean |
+hasLastPropagatedTimestamp()
+Checks if the client received any timestamps from a server.
+ |
+
void |
+importAuthenticationCredentials(byte[] authnData)
+Import data allowing this client to authenticate to the cluster.
+ |
+
boolean |
+isAlterTableDone(String name)
+Waits for all of the tablets in a table to be altered, or until the
+ default admin operation timeout is reached.
+ |
+
boolean |
+isCreateTableDone(String name)
+Waits for all of the tablets in a table to be created, or until the
+ default admin operation timeout is reached.
+ |
+
boolean |
+isStatisticsEnabled()
+Check if statistics collection is enabled for this client.
+ |
+
void |
+jwt(String jwt)
+Set JWT (JSON Web Token) to authenticate the client to a server.
+ |
+
ListTabletServersResponse |
+listTabletServers()
+Get the list of running tablet servers.
+ |
+
KuduScanner.KuduScannerBuilder |
+newScannerBuilder(KuduTable table)
+Creates a new
+KuduScanner.KuduScannerBuilder for a particular table. |
+
KuduScanToken.KuduScanTokenBuilder |
+newScanTokenBuilder(KuduTable table)
+Creates a new
+KuduScanToken.KuduScanTokenBuilder for a particular table. |
+
KuduSession |
+newSession()
+Create a new session for interacting with the cluster.
+ |
+
KuduTransaction |
+newTransaction()
+Start a new multi-row distributed transaction.
+ |
+
KuduTable |
+openTable(String name)
+Open the table with the given name.
+ |
+
RecallDeletedTableResponse |
+recallDeletedTable(String id)
+Recall a deleted table on the cluster with the specified table id
+ |
+
RecallDeletedTableResponse |
+recallDeletedTable(String id,
+ String newTableName)
+Recall a deleted table on the cluster with the specified table id
+ and give the recalled table the new table name
+ |
+
void |
+shutdown()
+Performs a graceful shutdown of this instance.
+ |
+
boolean |
+tableExists(String name)
+Test if a table exists.
+ |
+
void |
+trustedCertificates(List<com.google.protobuf.ByteString> certificates)
+Mark the given CA certificates (in DER format) as the trusted ones for the
+ client.
+ |
+
void |
+updateLastPropagatedTimestamp(long lastPropagatedTimestamp)
+Updates the last timestamp received from a server.
+ |
+
public static final long NO_TIMESTAMP+
public void updateLastPropagatedTimestamp(long lastPropagatedTimestamp)+
lastPropagatedTimestamp
- the last timestamp received from a server.public long getLastPropagatedTimestamp()+
public boolean hasLastPropagatedTimestamp()+
public String getLocationString()+
public String getClusterId()+
public KuduTable createTable(String name, + Schema schema, + CreateTableOptions builder) + throws KuduException+
name
- the table's nameschema
- the table's schemabuilder
- a builder containing the table's configurationsKuduException
- if anything went wrongpublic boolean isCreateTableDone(String name) + throws KuduException+
name
- the table's nameKuduException
- for any error returned by sending RPCs to the master
+ (e.g. the table does not exist)public DeleteTableResponse deleteTable(String name) + throws KuduException+
name
- the table's nameKuduException
- if anything went wrongpublic DeleteTableResponse deleteTable(String name, + int reserveSeconds) + throws KuduException+
name
- the table's namereserveSeconds
- the soft deleted table to be alive timeKuduException
- if anything went wrongpublic RecallDeletedTableResponse recallDeletedTable(String id) + throws KuduException+
id
- the table's idKuduException
- if anything went wrongpublic RecallDeletedTableResponse recallDeletedTable(String id, + String newTableName) + throws KuduException+
id
- the table's idnewTableName
- the recalled table's new nameKuduException
- if anything went wrongpublic AlterTableResponse alterTable(String name, + AlterTableOptions ato) + throws KuduException+
name
- the table's name (old name if the table is being renamed)ato
- the alter table optionsKuduException
- if anything went wrongpublic boolean isAlterTableDone(String name) + throws KuduException+
name
- the table's nameKuduException
- for any error returned by sending RPCs to the master
+ (e.g. the table does not exist)public ListTabletServersResponse listTabletServers() + throws KuduException+
KuduException
- if anything went wrongpublic ListTablesResponse getTablesList() + throws KuduException+
KuduException
- if anything went wrongpublic ListTablesResponse getTablesList(String nameFilter) + throws KuduException+
nameFilter
- an optional table name filterKuduException
- if anything went wrongpublic ListTablesResponse getSoftDeletedTablesList() + throws KuduException+
KuduException
- if anything went wrongpublic ListTablesResponse getSoftDeletedTablesList(String nameFilter) + throws KuduException+
nameFilter
- an optional table name filterKuduException
- if anything went wrongpublic KuduTableStatistics getTableStatistics(String name) + throws KuduException+
name
- the table's nameKuduException
- if anything went wrongpublic boolean tableExists(String name) + throws KuduException+
name
- a non-null table nameKuduException
- if anything went wrongpublic KuduTable openTable(String name) + throws KuduException+
name
- table to openKuduException
- if anything went wrongpublic KuduSession newSession()+
public KuduTransaction newTransaction() + throws KuduException+
+ Start a new multi-row transaction and return a handle for the transactional + object to manage the newly started transaction. Under the hood, this makes + an RPC call to the Kudu cluster and registers a newly created transaction + in the system. This call is blocking.
KuduException
public boolean isStatisticsEnabled()+
public Statistics getStatistics()+
IllegalStateException
- thrown if statistics collection has been disabledpublic KuduScanner.KuduScannerBuilder newScannerBuilder(KuduTable table)+
KuduScanner.KuduScannerBuilder
for a particular table.table
- the table you intend to scan.
+ The string is assumed to use the platform's default charset.public KuduScanToken.KuduScanTokenBuilder newScanTokenBuilder(KuduTable table)+
KuduScanToken.KuduScanTokenBuilder
for a particular table.
+ Used for integrations with compute frameworks.table
- the table you intend to scanpublic void close() + throws KuduException+
shutdown()
.close
in interface AutoCloseable
KuduException
- if an error happens while closing the connectionspublic void shutdown() + throws KuduException+
KuduException
- if anything went wrong@InterfaceStability.Unstable +public byte[] exportAuthenticationCredentials() + throws KuduException+
KuduException
@InterfaceStability.Unstable +public void importAuthenticationCredentials(byte[] authnData)+
authnData
- then authentication data provided by a prior call to
+ exportAuthenticationCredentials()
@InterfaceStability.Unstable +public void trustedCertificates(List<com.google.protobuf.ByteString> certificates) + throws CertificateException+
certificates
- list of certificates to trust (in DER format)CertificateException
- if any of the specified certificates were invalid@InterfaceStability.Unstable +public void jwt(String jwt)+
jwt
- The JSON web token to set.public long getDefaultOperationTimeoutMs()+
public long getDefaultAdminOperationTimeoutMs()+
public String getMasterAddressesAsString()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public static class KuduException.OriginalException +extends Throwable+
KuduException
+ as a suppressed exception (see Throwable#addSuppressed(Throwable)) of
+ thisaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
@InterfaceAudience.Public + @InterfaceStability.Evolving +public abstract class KuduException +extends IOException+
KuduSession
instead of
+ AsyncKuduSession
.
+
+ Each instance of this class has a Status
which gives more information about the error.Modifier and Type | +Class and Description | +
---|---|
static class |
+KuduException.OriginalException
+When exceptions are thrown by the asynchronous Kudu client, the stack trace is
+ typically deep within the internals of the Kudu client and/or Netty.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
Status |
+getStatus()
+Get the Status object for this exception.
+ |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
@InterfaceAudience.Public + @InterfaceStability.Evolving +public static class KuduPartitioner.KuduPartitionerBuilder +extends Object+
KuduPartitioner
.Constructor and Description | +
---|
KuduPartitionerBuilder(KuduTable table) |
+
Modifier and Type | +Method and Description | +
---|---|
KuduPartitioner |
+build()
+Builds a
+KuduPartitioner using the passed configurations. |
+
KuduPartitioner.KuduPartitionerBuilder |
+buildTimeout(long timeoutMillis)
+Set the timeout used for building the
+KuduPartitioner . |
+
public KuduPartitionerBuilder(KuduTable table)+
public KuduPartitioner.KuduPartitionerBuilder buildTimeout(long timeoutMillis)+
KuduPartitioner
.
+ Defaults to the AsyncKuduClient.getDefaultAdminOperationTimeoutMs()
.timeoutMillis
- the timeout to set in milliseconds.public KuduPartitioner build() + throws KuduException+
KuduPartitioner
using the passed configurations.KuduPartitioner
KuduException
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class KuduPartitioner +extends Object+
Modifier and Type | +Class and Description | +
---|---|
static class |
+KuduPartitioner.KuduPartitionerBuilder
+A Builder class to build
+KuduPartitioner . |
+
Constructor and Description | +
---|
KuduPartitioner(org.apache.kudu.client.PartitionSchema partitionSchema,
+ Map<String,org.apache.kudu.client.Partition> tabletIdToPartition) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+isCovered(PartialRow row)
+Determine if the given row falls into a valid partition.
+ |
+
int |
+numPartitions() |
+
int |
+partitionRow(PartialRow row)
+Determine the partition index that the given row falls into.
+ |
+
public int numPartitions()+
public boolean isCovered(PartialRow row)+
row
- The row to check.public int partitionRow(PartialRow row) + throws org.apache.kudu.client.NonCoveredRangeException+
row
- The row to be partitioned.org.apache.kudu.client.NonCoveredRangeException
- if the row falls into a non-covered range.@InterfaceAudience.Public + @InterfaceStability.Evolving +public static enum KuduPredicate.ComparisonOp +extends Enum<KuduPredicate.ComparisonOp>+
Enum Constant and Description | +
---|
EQUAL |
+
GREATER |
+
GREATER_EQUAL |
+
LESS |
+
LESS_EQUAL |
+
Modifier and Type | +Method and Description | +
---|---|
static KuduPredicate.ComparisonOp |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static KuduPredicate.ComparisonOp[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final KuduPredicate.ComparisonOp GREATER+
public static final KuduPredicate.ComparisonOp GREATER_EQUAL+
public static final KuduPredicate.ComparisonOp EQUAL+
public static final KuduPredicate.ComparisonOp LESS+
public static final KuduPredicate.ComparisonOp LESS_EQUAL+
public static KuduPredicate.ComparisonOp[] values()+
+for (KuduPredicate.ComparisonOp c : KuduPredicate.ComparisonOp.values()) + System.out.println(c); +
public static KuduPredicate.ComparisonOp valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@InterfaceAudience.Public + @InterfaceStability.Evolving +public class KuduPredicate +extends Object+
Modifier and Type | +Class and Description | +
---|---|
static class |
+KuduPredicate.ComparisonOp
+The comparison operator of a predicate.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+equals(Object o) |
+
int |
+hashCode() |
+
static KuduPredicate |
+newComparisonPredicate(ColumnSchema column,
+ KuduPredicate.ComparisonOp op,
+ BigDecimal value)
+Creates a new comparison predicate on a Decimal column.
+ |
+
static KuduPredicate |
+newComparisonPredicate(ColumnSchema column,
+ KuduPredicate.ComparisonOp op,
+ boolean value)
+Creates a new
+KuduPredicate on a boolean column. |
+
static KuduPredicate |
+newComparisonPredicate(ColumnSchema column,
+ KuduPredicate.ComparisonOp op,
+ byte[] value)
+Creates a new comparison predicate on a binary column.
+ |
+
static KuduPredicate |
+newComparisonPredicate(ColumnSchema column,
+ KuduPredicate.ComparisonOp op,
+ Date value)
+Creates a new comparison predicate on a date column.
+ |
+
static KuduPredicate |
+newComparisonPredicate(ColumnSchema column,
+ KuduPredicate.ComparisonOp op,
+ double value)
+Creates a new comparison predicate on a double column.
+ |
+
static KuduPredicate |
+newComparisonPredicate(ColumnSchema column,
+ KuduPredicate.ComparisonOp op,
+ float value)
+Creates a new comparison predicate on a float column.
+ |
+
static KuduPredicate |
+newComparisonPredicate(ColumnSchema column,
+ KuduPredicate.ComparisonOp op,
+ long value)
+Creates a new comparison predicate on an integer or timestamp column.
+ |
+
static KuduPredicate |
+newComparisonPredicate(ColumnSchema column,
+ KuduPredicate.ComparisonOp op,
+ Object value)
+Creates a new comparison predicate on a column.
+ |
+
static KuduPredicate |
+newComparisonPredicate(ColumnSchema column,
+ KuduPredicate.ComparisonOp op,
+ String value)
+Creates a new comparison predicate on a string column.
+ |
+
static KuduPredicate |
+newComparisonPredicate(ColumnSchema column,
+ KuduPredicate.ComparisonOp op,
+ Timestamp value)
+Creates a new comparison predicate on a timestamp column.
+ |
+
static <T> KuduPredicate |
+newInListPredicate(ColumnSchema column,
+ List<T> values)
+Creates a new IN list predicate.
+ |
+
static KuduPredicate |
+newIsNotNullPredicate(ColumnSchema column)
+Creates a new
+IS NOT NULL predicate. |
+
static KuduPredicate |
+newIsNullPredicate(ColumnSchema column)
+Creates a new
+IS NULL predicate. |
+
String |
+toString() |
+
public static KuduPredicate newComparisonPredicate(ColumnSchema column, + KuduPredicate.ComparisonOp op, + boolean value)+
KuduPredicate
on a boolean column.column
- the column schemaop
- the comparison operationvalue
- the value to compare againstpublic static KuduPredicate newComparisonPredicate(ColumnSchema column, + KuduPredicate.ComparisonOp op, + long value)+
column
- the column schemaop
- the comparison operationvalue
- the value to compare againstpublic static KuduPredicate newComparisonPredicate(ColumnSchema column, + KuduPredicate.ComparisonOp op, + BigDecimal value)+
column
- the column schemaop
- the comparison operationvalue
- the value to compare againstpublic static KuduPredicate newComparisonPredicate(ColumnSchema column, + KuduPredicate.ComparisonOp op, + Timestamp value)+
column
- the column schemaop
- the comparison operationvalue
- the value to compare againstpublic static KuduPredicate newComparisonPredicate(ColumnSchema column, + KuduPredicate.ComparisonOp op, + Date value)+
column
- the column schemaop
- the comparison operationvalue
- the value to compare againstpublic static KuduPredicate newComparisonPredicate(ColumnSchema column, + KuduPredicate.ComparisonOp op, + float value)+
column
- the column schemaop
- the comparison operationvalue
- the value to compare againstpublic static KuduPredicate newComparisonPredicate(ColumnSchema column, + KuduPredicate.ComparisonOp op, + double value)+
column
- the column schemaop
- the comparison operationvalue
- the value to compare againstpublic static KuduPredicate newComparisonPredicate(ColumnSchema column, + KuduPredicate.ComparisonOp op, + String value)+
column
- the column schemaop
- the comparison operationvalue
- the value to compare againstpublic static KuduPredicate newComparisonPredicate(ColumnSchema column, + KuduPredicate.ComparisonOp op, + byte[] value)+
column
- the column schemaop
- the comparison operationvalue
- the value to compare againstpublic static KuduPredicate newComparisonPredicate(ColumnSchema column, + KuduPredicate.ComparisonOp op, + Object value)+
Type
:
+ Type.BOOL -> java.lang.Boolean
+ Type.INT8 -> java.lang.Byte
+ Type.INT16 -> java.lang.Short
+ Type.INT32 -> java.lang.Integer
+ Type.INT64 -> java.lang.Long
+ Type.UNIXTIME_MICROS -> java.sql.Timestamp or java.lang.Long
+ Type.FLOAT -> java.lang.Float
+ Type.DOUBLE -> java.lang.Double
+ Type.STRING -> java.lang.String
+ Type.VARCHAR -> java.lang.String
+ Type.BINARY -> byte[]
+ Type.DECIMAL -> java.math.BigDecimal
+ Type.DATE -> java.sql.Datecolumn
- column the column schemaop
- the comparison operationvalue
- the value to compare againstpublic static <T> KuduPredicate newInListPredicate(ColumnSchema column, + List<T> values)+
T
- the type of values, must match the type of the columncolumn
- the column that the predicate applies tovalues
- list of values which the column values must matchpublic static KuduPredicate newIsNotNullPredicate(ColumnSchema column)+
IS NOT NULL
predicate.column
- the column that the predicate applies toIS NOT NULL
predicatepublic static KuduPredicate newIsNullPredicate(ColumnSchema column)+
IS NULL
predicate.column
- the column that the predicate applies toIS NULL
predicate@InterfaceAudience.Public + @InterfaceStability.Unstable +public static class KuduScanToken.KuduScanTokenBuilder +extends AbstractKuduScannerBuilder<KuduScanToken.KuduScanTokenBuilder,List<KuduScanToken>>+
Modifier and Type | +Method and Description | +
---|---|
List<KuduScanToken> |
+build() |
+
KuduScanToken.KuduScanTokenBuilder |
+includeTableMetadata(boolean includeMetadata)
+If the table metadata is included on the scan token a GetTableSchema
+ RPC call to the master can be avoided when deserializing each scan token
+ into a scanner.
+ |
+
KuduScanToken.KuduScanTokenBuilder |
+includeTabletMetadata(boolean includeMetadata)
+If the tablet metadata is included on the scan token a GetTableLocations
+ RPC call to the master can be avoided when scanning with a scanner constructed
+ from a scan token.
+ |
+
KuduScanToken.KuduScanTokenBuilder |
+setSplitSizeBytes(long splitSizeBytes)
+Sets the data size of key range.
+ |
+
KuduScanToken.KuduScanTokenBuilder |
+setTimeout(long timeoutMs)
+Sets a timeout value to use when building the list of scan tokens.
+ |
+
addColumnRangePredicate, addColumnRangePredicatesRaw, addPredicate, batchSizeBytes, cacheBlocks, exclusiveUpperBound, exclusiveUpperBoundRaw, keepAlivePeriodMs, limit, lowerBound, lowerBoundRaw, prefetching, readMode, replicaSelection, scanRequestTimeout, setFaultTolerant, setProjectedColumnIndexes, setProjectedColumnNames, snapshotTimestampMicros
public KuduScanToken.KuduScanTokenBuilder setTimeout(long timeoutMs)+
timeoutMs
- the timeout in milliseconds.public KuduScanToken.KuduScanTokenBuilder setSplitSizeBytes(long splitSizeBytes)+
splitSizeBytes
- the data size of key range.public KuduScanToken.KuduScanTokenBuilder includeTableMetadata(boolean includeMetadata)+
includeMetadata
- true, if table metadata should be included.public KuduScanToken.KuduScanTokenBuilder includeTabletMetadata(boolean includeMetadata)+
includeMetadata
- true, if tablet metadata should be included.public List<KuduScanToken> build()+
build
in class AbstractKuduScannerBuilder<KuduScanToken.KuduScanTokenBuilder,List<KuduScanToken>>
@InterfaceAudience.Public + @InterfaceStability.Unstable +public class KuduScanToken +extends Object +implements Comparable<KuduScanToken>+
KuduScanToken.KuduScanTokenBuilder
, clients can
+ describe the desired scan, including predicates, bounds, timestamps, and
+ caching, and receive back a collection of scan tokens.
+
+ Each scan token may be separately turned into a scanner using
+ intoScanner(org.apache.kudu.client.KuduClient)
, with each scanner responsible for a disjoint section
+ of the table.
+
+ Scan tokens may be serialized using the serialize()
method and
+ deserialized back into a scanner using the deserializeIntoScanner(byte[], org.apache.kudu.client.KuduClient)
+ method. This allows use cases such as generating scan tokens in the planner
+ component of a query engine, then sending the tokens to execution nodes based
+ on locality, and then instantiating the scanners on those nodes.
+
+ Scan token locality information can be inspected using the getTablet()
+ method.Modifier and Type | +Class and Description | +
---|---|
static class |
+KuduScanToken.KuduScanTokenBuilder
+Builds a sequence of scan tokens.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compareTo(KuduScanToken other) |
+
static KuduScanner |
+deserializeIntoScanner(byte[] buf,
+ KuduClient client)
+Deserializes a
+KuduScanToken into a KuduScanner . |
+
static KuduScanner.KuduScannerBuilder |
+deserializeIntoScannerBuilder(byte[] buf,
+ KuduClient client)
+Deserializes a
+KuduScanToken into a KuduScanner.KuduScannerBuilder . |
+
boolean |
+equals(Object o) |
+
LocatedTablet |
+getTablet()
+Returns the tablet which the scanner created from this token will access.
+ |
+
int |
+hashCode() |
+
KuduScanner |
+intoScanner(KuduClient client)
+Creates a
+KuduScanner from this scan token. |
+
static org.apache.kudu.client.RemoteTablet |
+newRemoteTabletFromTabletMetadata(org.apache.kudu.client.Client.TabletMetadataPB tabletMetadata,
+ String tableId,
+ org.apache.kudu.client.Partition partition)
+create a new RemoteTablet from TabletMetadata
+ |
+
byte[] |
+serialize()
+Serializes this
+KuduScanToken into a byte array. |
+
static String |
+stringifySerializedToken(byte[] buf,
+ KuduClient client)
+Formats the serialized token for debug printing.
+ |
+
public LocatedTablet getTablet()+
public KuduScanner intoScanner(KuduClient client) + throws IOException+
KuduScanner
from this scan token.client
- a Kudu client for the clusterIOException
public byte[] serialize() + throws IOException+
KuduScanToken
into a byte array.IOException
public static KuduScanner deserializeIntoScanner(byte[] buf, + KuduClient client) + throws IOException+
KuduScanToken
into a KuduScanner
.buf
- a byte array containing the serialized scan token.client
- a Kudu client for the clusterIOException
public static KuduScanner.KuduScannerBuilder deserializeIntoScannerBuilder(byte[] buf, + KuduClient client) + throws IOException+
KuduScanToken
into a KuduScanner.KuduScannerBuilder
.buf
- a byte array containing the serialized scan token.client
- a Kudu client for the clusterIOException
public static String stringifySerializedToken(byte[] buf, + KuduClient client) + throws IOException+
buf
- the serialized tokenclient
- a Kudu client for the cluster to which the token belongsIOException
public static org.apache.kudu.client.RemoteTablet newRemoteTabletFromTabletMetadata(org.apache.kudu.client.Client.TabletMetadataPB tabletMetadata, + String tableId, + org.apache.kudu.client.Partition partition)+
tabletMetadata
- the tablet metadatatableId
- the table Idpartition
- the partitionpublic int compareTo(KuduScanToken other)+
compareTo
in interface Comparable<KuduScanToken>
@InterfaceAudience.Public + @InterfaceStability.Evolving +public static class KuduScanner.KuduScannerBuilder +extends AbstractKuduScannerBuilder<KuduScanner.KuduScannerBuilder,KuduScanner>+
KuduScanner
.
+ Use KuduClient.newScannerBuilder(org.apache.kudu.client.KuduTable)
in order to get a builder instance.Modifier and Type | +Method and Description | +
---|---|
KuduScanner |
+build()
+Builds a
+KuduScanner using the passed configurations. |
+
addColumnRangePredicate, addColumnRangePredicatesRaw, addPredicate, batchSizeBytes, cacheBlocks, exclusiveUpperBound, exclusiveUpperBoundRaw, keepAlivePeriodMs, limit, lowerBound, lowerBoundRaw, prefetching, readMode, replicaSelection, scanRequestTimeout, setFaultTolerant, setProjectedColumnIndexes, setProjectedColumnNames, snapshotTimestampMicros
public KuduScanner build()+
KuduScanner
using the passed configurations.build
in class AbstractKuduScannerBuilder<KuduScanner.KuduScannerBuilder,KuduScanner>
KuduScanner
Modifier and Type | +Class and Description | +
---|---|
static class |
+KuduScanner.KuduScannerBuilder
+A Builder class to build
+KuduScanner . |
+
Modifier and Type | +Method and Description | +
---|---|
RowResultIterator |
+close()
+Closes this scanner (don't forget to call this when you're done with it!).
+ |
+
long |
+getBatchSizeBytes()
+Returns the maximum number of bytes returned by the scanner, on each batch.
+ |
+
boolean |
+getCacheBlocks()
+Returns if this scanner was configured to cache data blocks or not.
+ |
+
long |
+getLimit()
+Returns the maximum number of rows that this scanner was configured to return.
+ |
+
Schema |
+getProjectionSchema()
+Returns the projection schema of this scanner.
+ |
+
AsyncKuduScanner.ReadMode |
+getReadMode()
+Returns the ReadMode for this scanner.
+ |
+
ResourceMetrics |
+getResourceMetrics()
+Returns the resource metrics of this scanner.
+ |
+
long |
+getScanRequestTimeout()
+Returns the current value of the scanner's scan request timeout.
+ |
+
boolean |
+hasMoreRows()
+Tells if the last rpc returned that there might be more rows to scan.
+ |
+
boolean |
+isClosed() |
+
KuduScannerIterator |
+iterator() |
+
void |
+keepAlive()
+Keep the current remote scanner alive.
+ |
+
RowResultIterator |
+nextRows()
+Scans a number of rows.
+ |
+
void |
+setReuseRowResult(boolean reuseRowResult)
+If set to true, the
+RowResult object returned by the RowResultIterator
+ will be reused with each call to Iterator.next() . |
+
void |
+setRowDataFormat(AsyncKuduScanner.RowDataFormat rowDataFormat)
+Optionally set expected row data format.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public boolean hasMoreRows()+
public void setReuseRowResult(boolean reuseRowResult)+
RowResult
object returned by the RowResultIterator
+ will be reused with each call to Iterator.next()
.
+ This can be a useful optimization to reduce the number of objects created.
+
+ Note: DO NOT use this if the RowResult is stored between calls to next().
+ Enabling this optimization means that a call to next() mutates the previously returned
+ RowResult. Accessing the previously returned RowResult after a call to next(), by storing all
+ RowResults in a collection and accessing them later for example, will lead to all of the
+ stored RowResults being mutated as per the data in the last RowResult returned.public void setRowDataFormat(AsyncKuduScanner.RowDataFormat rowDataFormat)+
rowDataFormat
- Row data format to be expected.public RowResultIterator nextRows() + throws KuduException+
+ Once this method returns null
once (which indicates that this
+ Scanner
is done scanning), calling it again leads to an undefined
+ behavior.
KuduException
- if anything went wrong.public final void keepAlive() + throws KuduException+
+ Keep the current remote scanner alive on the Tablet server for an + additional time-to-live. This is useful if the interval in between + nextRows() calls is big enough that the remote scanner might be garbage + collected. The scanner time-to-live can be configured on the tablet + server via the --scanner_ttl_ms configuration flag and has a default + of 60 seconds. +
+ This does not invalidate any previously fetched results. +
+ Note that an exception thrown by this method should not be taken as indication + that the scan has failed. Subsequent calls to nextRows() might still be successful, + particularly if the scanner is configured to be fault tolerant.
KuduException
- if anything went wrong.public boolean isClosed()+
public RowResultIterator close() + throws KuduException+
+ Closing a scanner already closed has no effect.
KuduException
- if anything went wrong.public long getLimit()+
public boolean getCacheBlocks()+
public long getBatchSizeBytes()+
public AsyncKuduScanner.ReadMode getReadMode()+
public Schema getProjectionSchema()+
public ResourceMetrics getResourceMetrics()+
public long getScanRequestTimeout()+
public KuduScannerIterator iterator()+ +
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class KuduScannerIterator +extends Object +implements Iterator<RowResult>+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+hasNext() |
+
RowResult |
+next() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, remove
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class KuduSession +extends Object +implements SessionConfiguration+
AsyncKuduSession
.
+ Offers the same API but with blocking methods.+ + This class is not thread-safe.
SessionConfiguration.FlushMode
Modifier and Type | +Method and Description | +
---|---|
OperationResponse |
+apply(Operation operation)
+Apply a given
+Operation to Kudu as part of this session. |
+
List<OperationResponse> |
+close()
+Blocking call that flushes the buffers (see
+flush() ) and closes the sessions. |
+
int |
+countPendingErrors()
+Return the number of errors which are pending.
+ |
+
List<OperationResponse> |
+flush()
+Blocking call that force flushes this session's buffers.
+ |
+
SessionConfiguration.FlushMode |
+getFlushMode()
+Get the current flush mode.
+ |
+
RowErrorsAndOverflowStatus |
+getPendingErrors()
+Return any errors from previous calls.
+ |
+
long |
+getTimeoutMillis()
+Get the current timeout.
+ |
+
ResourceMetrics |
+getWriteOpMetrics()
+Return cumulative write operation metrics since the beginning of the session.
+ |
+
boolean |
+hasPendingOperations()
+Check if there are operations that haven't been completely applied.
+ |
+
boolean |
+isClosed()
+Returns true if this session has already been closed.
+ |
+
boolean |
+isIgnoreAllDuplicateRows()
+Tells if the session is currently ignoring row errors when the whole list returned by a tablet
+ server is of the AlreadyPresent type.
+ |
+
boolean |
+isIgnoreAllNotFoundRows()
+Tells if the session is currently ignoring row errors when the whole list returned by a tablet
+ server is of the NotFound type.
+ |
+
void |
+setErrorCollectorSpace(int size)
+Set the number of errors that can be collected.
+ |
+
void |
+setExternalConsistencyMode(ExternalConsistencyMode consistencyMode)
+Set the new external consistency mode for this session.
+ |
+
void |
+setFlushInterval(int intervalMillis)
+Set the flush interval, which will be used for the next scheduling decision.
+ |
+
void |
+setFlushMode(SessionConfiguration.FlushMode flushMode)
+Set the new flush mode for this session.
+ |
+
void |
+setIgnoreAllDuplicateRows(boolean ignoreAllDuplicateRows)
+Configures the option to ignore all the row errors if they are all of the AlreadyPresent type.
+ |
+
void |
+setIgnoreAllNotFoundRows(boolean ignoreAllNotFoundRows)
+Configures the option to ignore all the row errors if they are all of the NotFound type.
+ |
+
void |
+setMutationBufferLowWatermark(float mutationBufferLowWatermarkPercentage)
+Deprecated.
+ |
+
void |
+setMutationBufferSpace(int numOps)
+Set the number of operations that can be buffered.
+ |
+
void |
+setTimeoutMillis(long timeout)
+Sets the timeout for the next applied operations.
+ |
+
public OperationResponse apply(Operation operation) + throws KuduException+
Operation
to Kudu as part of this session.
+
+ + This is a blocking call that has different behavior based on the configured flush mode: + +
AUTO_FLUSH_SYNC
:
+ the call returns when the operation is persisted, else it throws an exception.
+
+ AUTO_FLUSH_BACKGROUND
:
+ the call returns when the operation has been added to the buffer.
+ This call should normally perform only fast in-memory operations but
+ it may have to wait when the buffer is full and there's another buffer being flushed. Row
+ errors can be checked by calling countPendingErrors()
and can be retrieved by calling
+ getPendingErrors()
.
+
+ MANUAL_FLUSH
:
+ the call returns when the operation has been added to the buffer, else it throws a
+ KuduException
if the buffer is full.
+
+ Note: PleaseThrottleException
is handled by this method and will not be thrown, unlike
+ with AsyncKuduSession.apply()
.
operation
- operation to applyKuduException
- if anything went wrongFlushMode
public List<OperationResponse> flush() + throws KuduException+
KuduException
- if anything went wrongpublic List<OperationResponse> close() + throws KuduException+
flush()
) and closes the sessions.KuduException
- if anything went wrongpublic SessionConfiguration.FlushMode getFlushMode()+
SessionConfiguration
getFlushMode
in interface SessionConfiguration
AUTO_FLUSH_SYNC
by defaultpublic void setFlushMode(SessionConfiguration.FlushMode flushMode)+
SessionConfiguration
setFlushMode
in interface SessionConfiguration
flushMode
- new flush mode, can be the same as the previous one.public void setMutationBufferSpace(int numOps)+
SessionConfiguration
setMutationBufferSpace
in interface SessionConfiguration
numOps
- number of ops.public void setErrorCollectorSpace(int size)+
SessionConfiguration
setErrorCollectorSpace
in interface SessionConfiguration
size
- number of errors.@Deprecated +public void setMutationBufferLowWatermark(float mutationBufferLowWatermarkPercentage)+
SessionConfiguration
setMutationBufferLowWatermark
in interface SessionConfiguration
mutationBufferLowWatermarkPercentage
- a new low watermark as a percentage,
+ has to be between 0 and 1 (inclusive). A value of 1 disables
+ the low watermark since it's the same as the high onepublic void setFlushInterval(int intervalMillis)+
SessionConfiguration
setFlushInterval
in interface SessionConfiguration
intervalMillis
- interval in milliseconds.public long getTimeoutMillis()+
SessionConfiguration
getTimeoutMillis
in interface SessionConfiguration
public void setTimeoutMillis(long timeout)+
SessionConfiguration
setTimeoutMillis
in interface SessionConfiguration
timeout
- Timeout in milliseconds.public boolean isClosed()+
SessionConfiguration
isClosed
in interface SessionConfiguration
public boolean hasPendingOperations()+
SessionConfiguration
hasPendingOperations
in interface SessionConfiguration
public void setExternalConsistencyMode(ExternalConsistencyMode consistencyMode)+
SessionConfiguration
setExternalConsistencyMode
in interface SessionConfiguration
consistencyMode
- new external consistency mode, can the same as the previous one.public boolean isIgnoreAllDuplicateRows()+
SessionConfiguration
isIgnoreAllDuplicateRows
in interface SessionConfiguration
public void setIgnoreAllDuplicateRows(boolean ignoreAllDuplicateRows)+
SessionConfiguration
Disabled by default.
setIgnoreAllDuplicateRows
in interface SessionConfiguration
ignoreAllDuplicateRows
- true if this session should enforce this, else falsepublic boolean isIgnoreAllNotFoundRows()+
SessionConfiguration
isIgnoreAllNotFoundRows
in interface SessionConfiguration
public void setIgnoreAllNotFoundRows(boolean ignoreAllNotFoundRows)+
SessionConfiguration
Disabled by default.
setIgnoreAllNotFoundRows
in interface SessionConfiguration
ignoreAllNotFoundRows
- true if this session should enforce this, else falsepublic int countPendingErrors()+
SessionConfiguration
AUTO_FLUSH_BACKGROUND
mode.countPendingErrors
in interface SessionConfiguration
public RowErrorsAndOverflowStatus getPendingErrors()+
SessionConfiguration
Clears the pending errors.
getPendingErrors
in interface SessionConfiguration
public ResourceMetrics getWriteOpMetrics()+
SessionConfiguration
getWriteOpMetrics
in interface SessionConfiguration
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class KuduTable +extends Object+
Modifier and Type | +Method and Description | +
---|---|
com.stumbleupon.async.Deferred<List<LocatedTablet>> |
+asyncGetTabletsLocations(byte[] startKey,
+ byte[] endKey,
+ long deadline)
+Deprecated.
+
+use the
+KuduScanToken API |
+
com.stumbleupon.async.Deferred<List<LocatedTablet>> |
+asyncGetTabletsLocations(long deadline)
+Deprecated.
+
+use the
+KuduScanToken API |
+
AsyncKuduClient |
+getAsyncClient()
+Get the async client that created this instance.
+ |
+
String |
+getComment()
+Get this table's comment.
+ |
+
Map<String,String> |
+getExtraConfig()
+Get this table's extra configuration properties.
+ |
+
String |
+getName()
+Get this table's name.
+ |
+
int |
+getNumReplicas()
+Get this table's replication factor.
+ |
+
String |
+getOwner()
+Get this table's owner.
+ |
+
Schema |
+getSchema()
+Get this table's schema, as of the moment this instance was created.
+ |
+
String |
+getTableId()
+Get this table's unique identifier.
+ |
+
KuduTableStatistics |
+getTableStatistics()
+Get this table's statistics.
+ |
+
List<LocatedTablet> |
+getTabletsLocations(byte[] startKey,
+ byte[] endKey,
+ long deadline)
+Deprecated.
+
+use the
+KuduScanToken API |
+
List<LocatedTablet> |
+getTabletsLocations(long deadline)
+Deprecated.
+
+use the
+KuduScanToken API |
+
Delete |
+newDelete()
+Get a new delete configured with this table's schema.
+ |
+
DeleteIgnore |
+newDeleteIgnore()
+Get a new delete ignore configured with this table's schema.
+ |
+
Insert |
+newInsert()
+Get a new insert configured with this table's schema.
+ |
+
InsertIgnore |
+newInsertIgnore()
+Get a new insert ignore configured with this table's schema.
+ |
+
Update |
+newUpdate()
+Get a new update configured with this table's schema.
+ |
+
UpdateIgnore |
+newUpdateIgnore()
+Get a new update ignore configured with this table's schema.
+ |
+
Upsert |
+newUpsert()
+Get a new upsert configured with this table's schema.
+ |
+
UpsertIgnore |
+newUpsertIgnore()
+Get a new upsert ignore configured with this table's schema.
+ |
+
public Schema getSchema()+
public String getName()+
public String getTableId()+
public int getNumReplicas()+
public Map<String,String> getExtraConfig()+
public String getOwner()+
public String getComment()+
public AsyncKuduClient getAsyncClient()+
public Insert newInsert()+
public Update newUpdate()+
public Delete newDelete()+
public Upsert newUpsert()+
UnsupportedOperationException
- if the table has auto-incrementing columnpublic UpsertIgnore newUpsertIgnore()+
UnsupportedOperationException
- if the table has auto-incrementing columnpublic InsertIgnore newInsertIgnore()+
public UpdateIgnore newUpdateIgnore()+
public DeleteIgnore newDeleteIgnore()+
@Deprecated +public com.stumbleupon.async.Deferred<List<LocatedTablet>> asyncGetTabletsLocations(long deadline)+
KuduScanToken
APIdeadline
- max time spent in milliseconds for the deferred result of this method to
+ get called back, if deadline is reached, the deferred result will get erred backDeferred
object that yields a list containing the metadata and
+ locations for each of the tablets in the table@Deprecated +public com.stumbleupon.async.Deferred<List<LocatedTablet>> asyncGetTabletsLocations(byte[] startKey, + byte[] endKey, + long deadline)+
KuduScanToken
APIstartKey
- where to start in the table, pass null to start at the beginningendKey
- where to stop in the table (exclusive), pass null to get all the tablets until
+ the end of the tabledeadline
- max time spent in milliseconds for the deferred result of this method to
+ get called back, if deadline is reached, the deferred result will get erred backDeferred
object that yields a list containing the metadata and locations
+ for each of the tablets in the table@Deprecated +public List<LocatedTablet> getTabletsLocations(long deadline) + throws Exception+
KuduScanToken
APIdeadline
- deadline in milliseconds for this method to finishException
@Deprecated +public List<LocatedTablet> getTabletsLocations(byte[] startKey, + byte[] endKey, + long deadline) + throws Exception+
KuduScanToken
APIstartKey
- where to start in the table, pass null to start at the beginningendKey
- where to stop in the table (exclusive), pass null to get all the tablets until
+ the end of the tabledeadline
- deadline in milliseconds for this method to finishException
public KuduTableStatistics getTableStatistics() + throws KuduException+
KuduException
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class KuduTableStatistics +extends Object+
Modifier and Type | +Method and Description | +
---|---|
long |
+getLiveRowCount()
+Get the table's live row count, this statistic is pre-replication.
+ |
+
long |
+getOnDiskSize()
+Get the table's on disk size, this statistic is pre-replication.
+ |
+
public long getOnDiskSize()+
public long getLiveRowCount()+
@InterfaceAudience.Public + @InterfaceStability.Unstable +public class KuduTransaction +extends Object +implements AutoCloseable+
+ Once created using KuduClient.newTransaction()
or
+ deserialize(byte[], org.apache.kudu.client.AsyncKuduClient)
methods, an instance of this class
+ can be used to commit or rollback the underlying multi-row transaction. To
+ issue write operations as a part of the transaction, use the
+ newKuduSession()
or
+ newAsyncKuduSession()
methods to create a new
+ transactional session and apply write operations using it.
+
+ The KuduTransaction
implements AutoCloseable
and should be
+ used with try-with-resource code construct. Once an object of this class
+ is constructed, it starts sending automatic keep-alive heartbeat messages
+ to keep the underlying transaction open. Once the object goes out of scope
+ and close()
is automatically called by the Java
+ runtime (or the method is called explicitly), the heartbeating stops and the
+ transaction is automatically aborted by the system after not receiving
+ heartbeat messages for a few keep-alive intervals.
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Stop keepalive heartbeating, if any was in progress for this transaction
+ handle.
+ |
+
void |
+commit()
+Commit the multi-row distributed transaction represented by this handle.
+ |
+
static KuduTransaction |
+deserialize(byte[] buf,
+ AsyncKuduClient client)
+Re-create KuduTransaction object given its serialized representation.
+ |
+
boolean |
+isCommitComplete()
+Check whether the commit phase for a transaction is complete.
+ |
+
AsyncKuduSession |
+newAsyncKuduSession()
+Create a new
+AsyncKuduSession based on this transaction. |
+
KuduSession |
+newKuduSession()
+Create a new
+KuduSession based on this transaction. |
+
void |
+rollback()
+Rollback the multi-row distributed transaction represented by this object.
+ |
+
byte[] |
+serialize()
+A shortcut for the
+serialize(SerializationOptions)
+ method invoked with default-constructed KuduTransaction.SerializationOptions . |
+
byte[] |
+serialize(org.apache.kudu.client.KuduTransaction.SerializationOptions options)
+Export information on the underlying transaction in a serialized form.
+ |
+
void |
+startCommit()
+Start committing the multi-row distributed transaction represented by
+ this handle.
+ |
+
public AsyncKuduSession newAsyncKuduSession()+
AsyncKuduSession
based on this transaction.
+ + All write operations using the result session will be performed in the + context of this transaction.
AsyncKuduSession
instancepublic KuduSession newKuduSession()+
KuduSession
based on this transaction.
+ + All write operations using the result session will be performed in the + context of this transaction.
KuduSession
instancepublic void commit() + throws KuduException+
+ This method starts committing the transaction and awaits for the commit + phase to finalize.
KuduException
- if something went wrongpublic void startCommit() + throws KuduException+
+ This method only starts committing the transaction, not awaiting for the
+ commit phase to finalize. Use isCommitComplete()
+ to check whether the transaction is committed.
KuduException
- if something went wrong upon starting to commitpublic boolean isCommitComplete() + throws KuduException+
true
if transaction has finalized, otherwise false
NonRecoverableException
- with Status.Aborted()
+ if transaction has been or is being abortedNonRecoverableException
- with Status.IllegalState()
+ if transaction is still open (i.e. commit() hasn't been called yet)NonRecoverableException
- with Status.NotSupported()
+ if transaction is in unexpected state (non-compatible backend?)KuduException
- if an error happens while querying the system about
+ the state of the transactionpublic void rollback() + throws KuduException+
+ This method initiates rolling back the transaction and returns right after + that. The system takes care of the rest. Once the control returns and + no exception is thrown, a client have a guarantee that all write + operations issued in the context of this transaction cannot be seen seen + outside.
KuduException
- if something went wrongpublic byte[] serialize(org.apache.kudu.client.KuduTransaction.SerializationOptions options) + throws IOException+
+ This method transforms this handle into its serialized representation. +
+ The serialized information on a Kudu transaction can be passed among
+ different Kudu clients running at multiple nodes, so those separate
+ Kudu clients can perform operations to be a part of the same distributed
+ transaction. The resulting string is referred as "transaction token" and
+ it can be deserialized into a transaction handle (i.e. an object of this
+ class) via the deserialize(byte[], org.apache.kudu.client.AsyncKuduClient)
method.
+
+ This method doesn't perform any RPC under the hood. +
+ The representation of the data in the serialized form (i.e. the format of + a Kudu transaction token) is an implementation detail, not a part of the + public API and can be changed without notice.
IOException
- if serialization failspublic byte[] serialize() + throws IOException+
serialize(SerializationOptions)
+ method invoked with default-constructed KuduTransaction.SerializationOptions
.IOException
public static KuduTransaction deserialize(byte[] buf, + AsyncKuduClient client) + throws IOException+
+ This method doesn't perform any RPC under the hood. The newly created
+ object automatically does or does not send keep-alive messages depending
+ on the KuduTransaction.SerializationOptions.isKeepaliveEnabled()
setting when
+ the original KuduTransaction
object was serialized using
+ serialize(org.apache.kudu.client.KuduTransaction.SerializationOptions)
method.
+
client
- Client instance to bound the result object tobuf
- serialized representation of a KuduTransaction
objectIOException
- if deserialization failspublic void close()+
+ This method is called automatically when the object goes out of scope
+ as prescribed for AutoCloseable
.
+
+ This method doesn't throw according to the recommendations for
+ AutoCloseable.close()
. In case of an error, this method just logs
+ the corresponding error message.
close
in interface AutoCloseable
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class ListTablesResponse +extends Object+
Modifier and Type | +Method and Description | +
---|---|
long |
+getElapsedMillis()
+Get the number of milliseconds elapsed since the RPC was created up to the moment when this
+ response was created.
+ |
+
List<org.apache.kudu.client.ListTablesResponse.TableInfo> |
+getTableInfosList()
+Get the list of tables as specified in the request.
+ |
+
List<String> |
+getTablesList()
+Get the list of tables as specified in the request.
+ |
+
String |
+getTsUUID()
+Get the identifier of the tablet server that sent the response.
+ |
+
public List<String> getTablesList()+
public List<org.apache.kudu.client.ListTablesResponse.TableInfo> getTableInfosList()+
public long getElapsedMillis()+
public String getTsUUID()+
null
if the RPC failed before tablet location lookup succeeded.@InterfaceAudience.Public + @InterfaceStability.Evolving +public class ListTabletServersResponse +extends Object+
Modifier and Type | +Method and Description | +
---|---|
long |
+getElapsedMillis()
+Get the number of milliseconds elapsed since the RPC was created up to the moment when this
+ response was created.
+ |
+
int |
+getTabletServersCount()
+Get the count of tablet servers as reported by the master.
+ |
+
List<String> |
+getTabletServersList()
+Get the list of tablet servers, as represented by their hostname.
+ |
+
String |
+getTsUUID()
+Get the identifier of the tablet server that sent the response.
+ |
+
public int getTabletServersCount()+
public List<String> getTabletServersList()+
public long getElapsedMillis()+
public String getTsUUID()+
null
if the RPC failed before tablet location lookup succeeded.@InterfaceAudience.Public + @InterfaceStability.Evolving +public static class LocatedTablet.Replica +extends Object+
Modifier and Type | +Method and Description | +
---|---|
String |
+getDimensionLabel() |
+
String |
+getRole() |
+
String |
+getRpcHost() |
+
Integer |
+getRpcPort() |
+
String |
+toString() |
+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class LocatedTablet +extends Object+
Modifier and Type | +Class and Description | +
---|---|
static class |
+LocatedTablet.Replica
+One of the replicas of the tablet.
+ |
+
Constructor and Description | +
---|
LocatedTablet(org.apache.kudu.client.RemoteTablet tablet) |
+
Modifier and Type | +Method and Description | +
---|---|
byte[] |
+getEndKey()
+Deprecated.
+
+use
+getPartition() |
+
LocatedTablet.Replica |
+getLeaderReplica()
+Return the current leader, or null if there is none.
+ |
+
List<LocatedTablet.Replica> |
+getReplicas() |
+
byte[] |
+getStartKey()
+Deprecated.
+
+use
+getPartition() |
+
byte[] |
+getTabletId() |
+
String |
+toString() |
+
@InterfaceAudience.LimitedPrivate(value="Tests") +public LocatedTablet(org.apache.kudu.client.RemoteTablet tablet)+
public List<LocatedTablet.Replica> getReplicas()+
@Deprecated +public byte[] getStartKey()+
getPartition()
@Deprecated +public byte[] getEndKey()+
getPartition()
public byte[] getTabletId()+
public LocatedTablet.Replica getLeaderReplica()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public abstract class Operation +extends org.apache.kudu.client.KuduRpc<OperationResponse>+
MASTER_SERVICE_NAME, TABLET_SERVER_SERVICE_NAME, TXN_MANAGER_SERVICE_NAME
Modifier and Type | +Method and Description | +
---|---|
PartialRow |
+getRow()
+Get the underlying row to modify.
+ |
+
byte[] |
+partitionKey()
+Returns the partition key this RPC is for, or
+null if the RPC is
+ not tablet specific. |
+
void |
+setRow(PartialRow row)
+Set the underlying row.
+ |
+
getExternalConsistencyMode, getTable, setExternalConsistencyMode, setPropagatedTimestamp, toString
public byte[] partitionKey()+
org.apache.kudu.client.KuduRpc
null
if the RPC is
+ not tablet specific.
+ + DO NOT MODIFY THE CONTENTS OF THE RETURNED ARRAY.
partitionKey
in class org.apache.kudu.client.KuduRpc<OperationResponse>
public PartialRow getRow()+
public void setRow(PartialRow row)+
+ KuduTable table = client.openTable("my-table");
+ PartialRow row = table.getSchema().newPartialRow();
+ ...
+ Operation op = table.newInsert();
+ op.setRow(row);
+
row
- the row to set@InterfaceAudience.Public + @InterfaceStability.Evolving +public class OperationResponse +extends Object+
Modifier and Type | +Method and Description | +
---|---|
static List<RowError> |
+collectErrors(List<OperationResponse> responses)
+Utility method that collects all the row errors from the given list of responses.
+ |
+
long |
+getElapsedMillis()
+Get the number of milliseconds elapsed since the RPC was created up to the moment when this
+ response was created.
+ |
+
RowError |
+getRowError()
+Returns a row error.
+ |
+
String |
+getTsUUID()
+Get the identifier of the tablet server that sent the response.
+ |
+
boolean |
+hasRowError()
+Tells if this operation response contains a row error.
+ |
+
public static List<RowError> collectErrors(List<OperationResponse> responses)+
responses
- a list of operation responses to collect the row errors frompublic RowError getRowError()+
hasRowError()
returns false, then this method returns null.public boolean hasRowError()+
public long getElapsedMillis()+
public String getTsUUID()+
null
if the RPC failed before tablet location lookup succeeded.@InterfaceAudience.Public + @InterfaceStability.Evolving +public class PartialRow +extends Object+
+
+ Values can be replaced as often as needed, but once the enclosing Operation
is applied
+ then they cannot be changed again. This means that a PartialRow cannot be reused.
+ + Each PartialRow is backed by an byte array where all the cells (except strings and binary data) + are written. The others are kept in a List.
+ + This class isn't thread-safe.
Constructor and Description | +
---|
PartialRow(Schema schema)
+This is not a stable API, prefer using
+Schema.newPartialRow()
+ to create a new partial row. |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addBinary(int columnIndex,
+ byte[] val)
+Add binary data with the specified value.
+ |
+
void |
+addBinary(int columnIndex,
+ ByteBuffer value)
+Add binary data with the specified value, from the current ByteBuffer's position to its limit.
+ |
+
void |
+addBinary(String columnName,
+ byte[] val)
+Add binary data with the specified value.
+ |
+
void |
+addBinary(String columnName,
+ ByteBuffer value)
+Add binary data with the specified value, from the current ByteBuffer's position to its limit.
+ |
+
void |
+addBoolean(int columnIndex,
+ boolean val)
+Add a boolean for the specified column.
+ |
+
void |
+addBoolean(String columnName,
+ boolean val)
+Add a boolean for the specified column.
+ |
+
void |
+addByte(int columnIndex,
+ byte val)
+Add a byte for the specified column.
+ |
+
void |
+addByte(String columnName,
+ byte val)
+Add a byte for the specified column.
+ |
+
void |
+addDate(int columnIndex,
+ Date val)
+Add a sql.Date for the specified column.
+ |
+
void |
+addDate(String columnName,
+ Date val)
+Add a Date for the specified column.
+ |
+
void |
+addDecimal(int columnIndex,
+ BigDecimal val)
+Add a Decimal for the specified column.
+ |
+
void |
+addDecimal(String columnName,
+ BigDecimal val)
+Add a Decimal for the specified column.
+ |
+
void |
+addDouble(int columnIndex,
+ double val)
+Add an double for the specified column.
+ |
+
void |
+addDouble(String columnName,
+ double val)
+Add an double for the specified column.
+ |
+
void |
+addFloat(int columnIndex,
+ float val)
+Add an float for the specified column.
+ |
+
void |
+addFloat(String columnName,
+ float val)
+Add an float for the specified column.
+ |
+
void |
+addInt(int columnIndex,
+ int val)
+Add an int for the specified column.
+ |
+
void |
+addInt(String columnName,
+ int val)
+Add an int for the specified column.
+ |
+
void |
+addLong(int columnIndex,
+ long val)
+Add an long for the specified column.
+ |
+
void |
+addLong(String columnName,
+ long val)
+Add an long for the specified column.
+ |
+
void |
+addObject(int columnIndex,
+ Object val)
+Add the specified column's value as an Object.
+ |
+
void |
+addObject(String columnName,
+ Object val)
+Add the specified column's value as an Object.
+ |
+
void |
+addShort(int columnIndex,
+ short val)
+Add a short for the specified column.
+ |
+
void |
+addShort(String columnName,
+ short val)
+Add a short for the specified column.
+ |
+
void |
+addString(int columnIndex,
+ String val)
+Add a String for the specified column.
+ |
+
void |
+addString(String columnName,
+ String val)
+Add a String for the specified column.
+ |
+
void |
+addStringUtf8(int columnIndex,
+ byte[] val)
+Add a String for the specified value, encoded as UTF8.
+ |
+
void |
+addStringUtf8(String columnName,
+ byte[] val)
+Add a String for the specified value, encoded as UTF8.
+ |
+
void |
+addTimestamp(int columnIndex,
+ Timestamp val)
+Add a Timestamp for the specified column.
+ |
+
void |
+addTimestamp(String columnName,
+ Timestamp val)
+Add a Timestamp for the specified column.
+ |
+
void |
+addVarchar(int columnIndex,
+ String val)
+Add a VARCHAR for the specified column.
+ |
+
void |
+addVarchar(String columnName,
+ String val)
+Add a VARCHAR for the specified column.
+ |
+
byte[] |
+encodePrimaryKey()
+Returns the encoded primary key of the row.
+ |
+
ByteBuffer |
+getBinary(int columnIndex)
+Get the specified column's binary data.
+ |
+
ByteBuffer |
+getBinary(String columnName)
+Get the specified column's binary data.
+ |
+
byte[] |
+getBinaryCopy(int columnIndex)
+Get a copy of the specified column's binary data.
+ |
+
byte[] |
+getBinaryCopy(String columnName)
+Get a copy of the specified column's binary data.
+ |
+
boolean |
+getBoolean(int columnIndex)
+Get the specified column's boolean
+ |
+
boolean |
+getBoolean(String columnName)
+Get the specified column's boolean
+ |
+
byte |
+getByte(int columnIndex)
+Get the specified column's byte
+ |
+
byte |
+getByte(String columnName)
+Get the specified column's byte
+ |
+
Date |
+getDate(int columnIndex)
+Get the specified column's Date.
+ |
+
Date |
+getDate(String columnName)
+Get the specified column's Date.
+ |
+
BigDecimal |
+getDecimal(int columnIndex)
+Get the specified column's Decimal.
+ |
+
BigDecimal |
+getDecimal(String columnName)
+Get the specified column's BigDecimal
+ |
+
double |
+getDouble(int columnIndex)
+Get the specified column's double
+ |
+
double |
+getDouble(String columnName)
+Get the specified column's double
+ |
+
float |
+getFloat(int columnIndex)
+Get the specified column's float
+ |
+
float |
+getFloat(String columnName)
+Get the specified column's float
+ |
+
int |
+getInt(int columnIndex)
+Get the specified column's integer
+ |
+
int |
+getInt(String columnName)
+Get the specified column's integer
+ |
+
long |
+getLong(int columnIndex)
+Get the specified column's long
+
+ If this is a UNIXTIME_MICROS column, the long value corresponds to a number of microseconds
+ since midnight, January 1, 1970 UTC.
+ |
+
long |
+getLong(String columnName)
+Get the specified column's long
+
+ If this is a UNIXTIME_MICROS column, the long value corresponds to a number of microseconds
+ since midnight, January 1, 1970 UTC.
+ |
+
Object |
+getObject(int columnIndex)
+Get the specified column's value as an Object.
+ |
+
Object |
+getObject(String columnName)
+Get the specified column's value as an Object.
+ |
+
Schema |
+getSchema()
+Get the schema used for this row.
+ |
+
short |
+getShort(int columnIndex)
+Get the specified column's short
+ |
+
short |
+getShort(String columnName)
+Get the specified column's short
+ |
+
String |
+getString(int columnIndex)
+Get the specified column's string.
+ |
+
String |
+getString(String columnName)
+Get the specified column's string.
+ |
+
Timestamp |
+getTimestamp(int columnIndex)
+Get the specified column's Timestamp.
+ |
+
Timestamp |
+getTimestamp(String columnName)
+Get the specified column's Timestamp.
+ |
+
String |
+getVarchar(int columnIndex)
+Get the specified column's VARCHAR.
+ |
+
String |
+getVarchar(String columnName)
+Get the specified column's VARCHAR.
+ |
+
boolean |
+isNull(int columnIndex)
+Get if the specified column is NULL
+ |
+
boolean |
+isNull(String columnName)
+Get if the specified column is NULL
+ |
+
boolean |
+isSet(int columnIndex)
+Get if the specified column has been set
+ |
+
boolean |
+isSet(String columnName)
+Get if the specified column has been set
+ |
+
void |
+setNull(int columnIndex)
+Set the specified column to null
+ |
+
void |
+setNull(String columnName)
+Set the specified column to null
+ |
+
String |
+stringifyRowKey()
+Transforms the row key into a string representation where each column is in the format:
+ "type col_name=value".
+ |
+
String |
+toString() |
+
public PartialRow(Schema schema)+
Schema.newPartialRow()
+ to create a new partial row.schema
- the schema to use for this rowpublic void addBoolean(int columnIndex, + boolean val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addBoolean(String columnName, + boolean val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic boolean getBoolean(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic boolean getBoolean(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void addByte(int columnIndex, + byte val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addByte(String columnName, + byte val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic byte getByte(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic byte getByte(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void addShort(int columnIndex, + short val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addShort(String columnName, + short val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic short getShort(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic short getShort(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void addInt(int columnIndex, + int val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addInt(String columnName, + int val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic int getInt(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic int getInt(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void addLong(int columnIndex, + long val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addLong(String columnName, + long val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic long getLong(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic long getLong(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void addFloat(int columnIndex, + float val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addFloat(String columnName, + float val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic float getFloat(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic float getFloat(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void addDouble(int columnIndex, + double val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addDouble(String columnName, + double val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic double getDouble(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic double getDouble(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void addDecimal(int columnIndex, + BigDecimal val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addDecimal(String columnName, + BigDecimal val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic BigDecimal getDecimal(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic BigDecimal getDecimal(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void addTimestamp(int columnIndex, + Timestamp val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addTimestamp(String columnName, + Timestamp val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic Timestamp getTimestamp(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic Timestamp getTimestamp(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void addDate(int columnIndex, + Date val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addDate(String columnName, + Date val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic Date getDate(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic Date getDate(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void addString(int columnIndex, + String val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addString(String columnName, + String val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic void addVarchar(int columnIndex, + String val)+
columnIndex
- Index of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist, is the wrong type
+ or the string is not UTF-8IllegalStateException
- if the row was already appliedpublic void addVarchar(String columnName, + String val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist, is the wrong type
+ or the string is not UTF-8IllegalStateException
- if the row was already appliedpublic String getString(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic String getString(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic String getVarchar(String columnName)+
columnName
- Name of the column to get the data forIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic String getVarchar(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void addStringUtf8(int columnIndex, + byte[] val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addStringUtf8(String columnName, + byte[] val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic void addBinary(int columnIndex, + byte[] val)+
columnIndex
- the column's index in the schemaval
- value to addIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addBinary(int columnIndex, + ByteBuffer value)+
columnIndex
- the column's index in the schemavalue
- byte buffer to get the value fromIllegalArgumentException
- if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addBinary(String columnName, + byte[] val)+
columnName
- Name of the columnval
- value to addIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic void addBinary(String columnName, + ByteBuffer value)+
columnName
- Name of the columnvalue
- byte buffer to get the value fromIllegalArgumentException
- if the column doesn't exist
+ or if the value doesn't match the column's typeIllegalStateException
- if the row was already appliedpublic byte[] getBinaryCopy(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic byte[] getBinaryCopy(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic ByteBuffer getBinary(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic ByteBuffer getBinary(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic void setNull(int columnIndex)+
columnIndex
- the column's index in the schemaIllegalArgumentException
- if the column doesn't exist or cannot be set to nullIllegalStateException
- if the row was already appliedpublic void setNull(String columnName)+
columnName
- Name of the columnIllegalArgumentException
- if the column doesn't exist or cannot be set to nullIllegalStateException
- if the row was already appliedpublic boolean isNull(String columnName)+
columnName
- name of the column in the schemaIllegalArgumentException
- if the column doesn't existpublic boolean isNull(int columnIndex)+
columnIndex
- Column index in the schemaIndexOutOfBoundsException
- if the column doesn't existpublic void addObject(String columnName, + Object val)+
Type
:
+ Type.BOOL -> java.lang.Boolean
+ Type.INT8 -> java.lang.Byte
+ Type.INT16 -> java.lang.Short
+ Type.INT32 -> java.lang.Integer
+ Type.INT64 -> java.lang.Long
+ Type.UNIXTIME_MICROS -> java.sql.Timestamp or java.lang.Long
+ Type.FLOAT -> java.lang.Float
+ Type.DOUBLE -> java.lang.Double
+ Type.STRING -> java.lang.String
+ Type.VARCHAR -> java.lang.String
+ Type.BINARY -> byte[] or java.lang.ByteBuffer
+ Type.DECIMAL -> java.math.BigDecimalcolumnName
- name of the column in the schemaval
- the value to add as an ObjectIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic void addObject(int columnIndex, + Object val)+
Type
:
+ Type.BOOL -> java.lang.Boolean
+ Type.INT8 -> java.lang.Byte
+ Type.INT16 -> java.lang.Short
+ Type.INT32 -> java.lang.Integer
+ Type.INT64 -> java.lang.Long
+ Type.UNIXTIME_MICROS -> java.sql.Timestamp or java.lang.Long
+ Type.FLOAT -> java.lang.Float
+ Type.DOUBLE -> java.lang.Double
+ Type.STRING -> java.lang.String
+ Type.VARCHAR -> java.lang.String
+ Type.BINARY -> byte[] or java.lang.ByteBuffer
+ Type.DECIMAL -> java.math.BigDecimal
+ Type.DATE -> java.sql.DatecolumnIndex
- column index in the schemaval
- the value to add as an ObjectIllegalStateException
- if the row was already appliedIndexOutOfBoundsException
- if the column doesn't existpublic Object getObject(String columnName)+
Type
:
+ Type.BOOL -> java.lang.Boolean
+ Type.INT8 -> java.lang.Byte
+ Type.INT16 -> java.lang.Short
+ Type.INT32 -> java.lang.Integer
+ Type.INT64 -> java.lang.Long
+ Type.UNIXTIME_MICROS -> java.sql.Timestamp
+ Type.FLOAT -> java.lang.Float
+ Type.DOUBLE -> java.lang.Double
+ Type.STRING -> java.lang.String
+ Type.VARCHAR -> java.lang.String
+ Type.BINARY -> byte[]
+ Type.DECIMAL -> java.math.BigDecimal
+ Type.DATE -> java.sql.DatecolumnName
- name of the column in the schemaIndexOutOfBoundsException
- if the column doesn't existpublic Object getObject(int columnIndex)+
Type
:
+ Type.BOOL -> java.lang.Boolean
+ Type.INT8 -> java.lang.Byte
+ Type.INT16 -> java.lang.Short
+ Type.INT32 -> java.lang.Integer
+ Type.INT64 -> java.lang.Long
+ Type.UNIXTIME_MICROS -> java.sql.Timestamp
+ Type.FLOAT -> java.lang.Float
+ Type.DOUBLE -> java.lang.Double
+ Type.STRING -> java.lang.String
+ Type.VARCHAR -> java.lang.String
+ Type.BINARY -> byte[]
+ Type.DECIMAL -> java.math.BigDecimalcolumnIndex
- Column index in the schemaIndexOutOfBoundsException
- if the column doesn't existpublic boolean isSet(String columnName)+
columnName
- name of the column in the schemaIllegalArgumentException
- if the column doesn't existpublic boolean isSet(int columnIndex)+
columnIndex
- Column index in the schemaIndexOutOfBoundsException
- if the column doesn't existpublic byte[] encodePrimaryKey()+
public String stringifyRowKey()+
public Schema getSchema()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public final class PleaseThrottleException +extends KuduException +implements HasFailedRpcException+
+ Since all APIs of AsyncKuduSession
are asynchronous and non-blocking,
+ it's possible that the application would produce RPCs at a rate higher
+ than Kudu is able to handle. When this happens, AsyncKuduSession
+ will typically do some buffering up to a certain point beyond which RPCs
+ will fail-fast with this exception, to prevent the application from
+ running itself out of memory.
+
+ This exception is expected to be handled by having the application
+ throttle or pause itself for a short period of time before retrying the
+ RPC that failed with this exception as well as before sending other RPCs.
+ The reason this exception inherits from NonRecoverableException
+ instead of RecoverableException
is that the usual course of action
+ when handling a RecoverableException
is to retry right away, which
+ would defeat the whole purpose of this exception. Here, we want the
+ application to retry after a reasonable delay as well as throttle
+ the pace of creation of new RPCs. What constitutes a "reasonable
+ delay" depends on the nature of RPCs and rate at which they're produced.
+
+ One effective strategy to handle this exception is to set a flag to true
+ when this exception is first emitted that causes the application to pause
+ or throttle its use of Kudu. Then you can retry the RPC that failed
+ (which is accessible through getFailedRpc()
) and add a callback to
+ it in order to unset the flag once the RPC completes successfully.
+ Note that low-throughput applications will typically rarely (if ever)
+ hit this exception, so they don't need complex throttling logic.
KuduException.OriginalException
Modifier and Type | +Method and Description | +
---|---|
com.stumbleupon.async.Deferred |
+getDeferred()
+Returns a deferred one can wait on before retrying the failed RPC.
+ |
+
Operation |
+getFailedRpc()
+The RPC that was made to fail with this exception.
+ |
+
getStatus
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public Operation getFailedRpc()+
getFailedRpc
in interface HasFailedRpcException
public com.stumbleupon.async.Deferred getDeferred()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public enum RangePartitionBound +extends Enum<RangePartitionBound>+
Enum Constant and Description | +
---|
EXCLUSIVE_BOUND
+An exclusive range partition bound.
+ |
+
INCLUSIVE_BOUND
+An inclusive range partition bound.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static RangePartitionBound |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static RangePartitionBound[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final RangePartitionBound EXCLUSIVE_BOUND+
public static final RangePartitionBound INCLUSIVE_BOUND+
public static RangePartitionBound[] values()+
+for (RangePartitionBound c : RangePartitionBound.values()) + System.out.println(c); +
public static RangePartitionBound valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@InterfaceAudience.Public
+ @InterfaceStability.Evolving
+public class RangePartitionWithCustomHashSchema
+extends org.apache.kudu.client.RangePartition
+Constructor and Description | +
---|
RangePartitionWithCustomHashSchema(PartialRow lowerBound,
+ PartialRow upperBound,
+ RangePartitionBound lowerBoundType,
+ RangePartitionBound upperBoundType) |
+
Modifier and Type | +Method and Description | +
---|---|
org.apache.kudu.client.RangePartition |
+addHashPartitions(List<String> columns,
+ int numBuckets,
+ int seed)
+Add a level of hash sub-partitioning for this range partition.
+ |
+
org.apache.kudu.Common.PartitionSchemaPB.RangeWithHashSchemaPB |
+toPB() |
+
getLowerBound, getLowerBoundType, getUpperBound, getUpperBoundType
public RangePartitionWithCustomHashSchema(PartialRow lowerBound, + PartialRow upperBound, + RangePartitionBound lowerBoundType, + RangePartitionBound upperBoundType)+
lowerBound
- upper bound of the range partitionupperBound
- lower bound of the range partitionlowerBoundType
- lower bound type: inclusive/exclusiveupperBoundType
- upper bound type: inclusive/exclusivepublic org.apache.kudu.client.RangePartition addHashPartitions(List<String> columns, + int numBuckets, + int seed)+
columns
- name of table's columns to use for hash bucketingnumBuckets
- number of buckets used by the hash functionseed
- the seed for the hash functionpublic org.apache.kudu.Common.PartitionSchemaPB.RangeWithHashSchemaPB toPB()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class RecallDeletedTableResponse +extends Object+
Modifier and Type | +Method and Description | +
---|---|
long |
+getElapsedMillis()
+Get the number of milliseconds elapsed since the RPC was created up to the moment when this
+ response was created.
+ |
+
String |
+getTsUUID()
+Get the identifier of the tablet server that sent the response.
+ |
+
public long getElapsedMillis()+
public String getTsUUID()+
null
if the RPC failed before tablet location lookup succeeded.@InterfaceAudience.Public + @InterfaceStability.Evolving +public enum ReplicaSelection +extends Enum<ReplicaSelection>+
Enum Constant and Description | +
---|
CLOSEST_REPLICA
+Select the closest replica to the client.
+ |
+
LEADER_ONLY
+Select the LEADER replica.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static ReplicaSelection |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ReplicaSelection[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final ReplicaSelection LEADER_ONLY+
public static final ReplicaSelection CLOSEST_REPLICA+
public static ReplicaSelection[] values()+
+for (ReplicaSelection c : ReplicaSelection.values()) + System.out.println(c); +
public static ReplicaSelection valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@InterfaceAudience.Public + @InterfaceStability.Evolving +public class ResourceMetrics +extends Object+
+ This class wraps a mapping from metric name to metric value for server-side + metrics associated with a scanner and write operation.
Constructor and Description | +
---|
ResourceMetrics() |
+
Modifier and Type | +Method and Description | +
---|---|
Map<String,Long> |
+get()
+Returns a copy of this ResourceMetrics's underlying map of metric name to
+ metric value.
+ |
+
long |
+getMetric(String name)
+Returns the value of the metric named by 'name', or 0 if there is no such metric.
+ |
+
public Map<String,Long> get()+
public long getMetric(String name)+
name
- the name of the metric to get the value for@InterfaceAudience.Public + @InterfaceStability.Evolving +public class RowError +extends Object+
Modifier and Type | +Method and Description | +
---|---|
Status |
+getErrorStatus()
+Get the status code and message of the row error.
+ |
+
String |
+getMessage()
+Deprecated.
+
+Please use getErrorStatus() instead. Will be removed in a future version.
+ |
+
Operation |
+getOperation()
+Get the Operation that failed.
+ |
+
String |
+getStatus()
+Deprecated.
+
+Please use getErrorStatus() instead. Will be removed in a future version.
+ |
+
String |
+getTsUUID()
+Get the identifier of the tablet server that sent the error.
+ |
+
String |
+toString() |
+
public Status getErrorStatus()+
@Deprecated +public String getStatus()+
@Deprecated +public String getMessage()+
public Operation getOperation()+
public String getTsUUID()+
null
if the failure occurred before sending the row
+ to a tablet server (for instance, if the row falls in a non-covered range partition).@InterfaceAudience.Public + @InterfaceStability.Evolving +public class RowErrorsAndOverflowStatus +extends Object+
Modifier and Type | +Method and Description | +
---|---|
RowError[] |
+getRowErrors()
+Get the collected row errors.
+ |
+
boolean |
+isOverflowed()
+Check if the error collector had an overflow and had to discard row errors.
+ |
+
String |
+toString() |
+
public RowError[] getRowErrors()+
public boolean isOverflowed()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public abstract class RowResult +extends Object+
Modifier and Type | +Field and Description | +
---|---|
protected int |
+index |
+
protected static int |
+INDEX_RESET_LOCATION |
+
protected Schema |
+schema |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+checkNull(int columnIndex) |
+
protected void |
+checkType(int columnIndex,
+ Type... types) |
+
protected void |
+checkValidColumn(int columnIndex) |
+
abstract ByteBuffer |
+getBinary(int columnIndex)
+Get the specified column's binary data.
+ |
+
ByteBuffer |
+getBinary(String columnName)
+Get the specified column's binary data.
+ |
+
abstract byte[] |
+getBinaryCopy(int columnIndex)
+Get a copy of the specified column's binary data.
+ |
+
byte[] |
+getBinaryCopy(String columnName)
+Get a copy of the specified column's binary data.
+ |
+
abstract boolean |
+getBoolean(int columnIndex)
+Get the specified column's boolean
+ |
+
boolean |
+getBoolean(String columnName)
+Get the specified column's boolean
+ |
+
abstract byte |
+getByte(int columnIndex)
+Get the specified column's byte
+ |
+
byte |
+getByte(String columnName)
+Get the specified column's byte
+ |
+
Schema |
+getColumnProjection()
+Get the schema used for this scanner's column projection.
+ |
+
Type |
+getColumnType(int columnIndex)
+Get the type of a column in this result.
+ |
+
Type |
+getColumnType(String columnName)
+Get the type of a column in this result.
+ |
+
Date |
+getDate(int columnIndex)
+Get the specified column's Date.
+ |
+
Date |
+getDate(String columnName)
+Get the specified column's Date.
+ |
+
abstract BigDecimal |
+getDecimal(int columnIndex)
+Get the specified column's Decimal.
+ |
+
BigDecimal |
+getDecimal(String columnName)
+Get the specified column's Decimal.
+ |
+
abstract double |
+getDouble(int columnIndex)
+Get the specified column's double
+ |
+
double |
+getDouble(String columnName)
+Get the specified column's double
+ |
+
abstract float |
+getFloat(int columnIndex)
+Get the specified column's float
+ |
+
float |
+getFloat(String columnName)
+Get the specified column's float
+ |
+
abstract int |
+getInt(int columnIndex)
+Get the specified column's integer
+ |
+
int |
+getInt(String columnName)
+Get the specified column's integer
+ |
+
abstract long |
+getLong(int columnIndex)
+Get the specified column's long
+
+ If this is a UNIXTIME_MICROS column, the long value corresponds to a number of microseconds
+ since midnight, January 1, 1970 UTC.
+ |
+
long |
+getLong(String columnName)
+Get the specified column's long
+
+ If this is a UNIXTIME_MICROS column, the long value corresponds to a number of microseconds
+ since midnight, January 1, 1970 UTC.
+ |
+
Object |
+getObject(int columnIndex)
+Get the specified column's value as an Object.
+ |
+
Object |
+getObject(String columnName)
+Get the specified column's value as an Object.
+ |
+
Schema |
+getSchema()
+Get the schema associated with this result.
+ |
+
abstract short |
+getShort(int columnIndex)
+Get the specified column's short
+ |
+
short |
+getShort(String columnName)
+Get the specified column's short
+ |
+
String |
+getString(int columnIndex)
+Get the specified column's string.
+ |
+
String |
+getString(String columnName)
+Get the specified column's string.
+ |
+
abstract Timestamp |
+getTimestamp(int columnIndex)
+Get the specified column's Timestamp.
+ |
+
Timestamp |
+getTimestamp(String columnName)
+Get the specified column's Timestamp.
+ |
+
String |
+getVarchar(int columnIndex)
+Get the specified column's varchar.
+ |
+
String |
+getVarchar(String columnName)
+Get the specified column's varchar.
+ |
+
protected abstract String |
+getVarLengthData(int columnIndex) |
+
abstract boolean |
+isNull(int columnIndex)
+Get if the specified column is NULL
+ |
+
boolean |
+isNull(String columnName)
+Get if the specified column is NULL
+ |
+
String |
+rowToString()
+Return the actual data from this row in a stringified key=value
+ form.
+ |
+
String |
+toStringLongFormat() |
+
protected static final int INDEX_RESET_LOCATION+
protected int index+
protected final Schema schema+
public final int getInt(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist, is null,
+ or if the type doesn't match the column's typepublic abstract int getInt(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic final short getShort(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist, is null,
+ or if the type doesn't match the column's typepublic abstract short getShort(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic final boolean getBoolean(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist, is null,
+ or if the type doesn't match the column's typepublic abstract boolean getBoolean(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic final byte getByte(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist, is null,
+ or if the type doesn't match the column's typepublic abstract byte getByte(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic final long getLong(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist or is nullpublic abstract long getLong(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is nullIndexOutOfBoundsException
- if the column doesn't existpublic final float getFloat(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist, is null,
+ or if the type doesn't match the column's typepublic abstract float getFloat(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic final double getDouble(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist, is null,
+ or if the type doesn't match the column's typepublic abstract double getDouble(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic final BigDecimal getDecimal(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist or is nullpublic abstract BigDecimal getDecimal(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is nullIndexOutOfBoundsException
- if the column doesn't existpublic final Timestamp getTimestamp(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic abstract Timestamp getTimestamp(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic final Date getDate(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist,
+ is null, is unset, or the type doesn't match the column's typepublic final Date getDate(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null, is unset,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic final Schema getColumnProjection()+
public final String getString(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist, is null,
+ or if the type doesn't match the column's typepublic final String getString(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existprotected abstract String getVarLengthData(int columnIndex)+
public final String getVarchar(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic final String getVarchar(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist, is null,
+ or if the type doesn't match the column's typepublic final byte[] getBinaryCopy(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist, is null,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic abstract byte[] getBinaryCopy(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic final ByteBuffer getBinary(String columnName)+
columnName
- name of the column to get data forIllegalArgumentException
- if the column doesn't exist, is null,
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic abstract ByteBuffer getBinary(int columnIndex)+
columnIndex
- Column index in the schemaIllegalArgumentException
- if the column is null
+ or if the type doesn't match the column's typeIndexOutOfBoundsException
- if the column doesn't existpublic final boolean isNull(String columnName)+
columnName
- name of the column in the schemaIndexOutOfBoundsException
- if the column doesn't existpublic abstract boolean isNull(int columnIndex)+
columnIndex
- Column index in the schemaIndexOutOfBoundsException
- if the column doesn't existpublic final Object getObject(String columnName)+
Type
:
+ Type.BOOL -> java.lang.Boolean
+ Type.INT8 -> java.lang.Byte
+ Type.INT16 -> java.lang.Short
+ Type.INT32 -> java.lang.Integer
+ Type.INT64 -> java.lang.Long
+ Type.UNIXTIME_MICROS -> java.sql.Timestamp
+ Type.FLOAT -> java.lang.Float
+ Type.DOUBLE -> java.lang.Double
+ Type.VARCHAR -> java.lang.String
+ Type.STRING -> java.lang.String
+ Type.BINARY -> byte[]
+ Type.DECIMAL -> java.math.BigDecimalcolumnName
- name of the column in the schemaIndexOutOfBoundsException
- if the column doesn't existpublic final Object getObject(int columnIndex)+
Type
:
+ Type.BOOL -> java.lang.Boolean
+ Type.INT8 -> java.lang.Byte
+ Type.INT16 -> java.lang.Short
+ Type.INT32 -> java.lang.Integer
+ Type.INT64 -> java.lang.Long
+ Type.UNIXTIME_MICROS -> java.sql.Timestamp
+ Type.FLOAT -> java.lang.Float
+ Type.DOUBLE -> java.lang.Double
+ Type.VARCHAR -> java.lang.String
+ Type.STRING -> java.lang.String
+ Type.BINARY -> byte[]
+ Type.DECIMAL -> java.math.BigDecimal
+ Type.Date -> java.sql.DatecolumnIndex
- Column index in the schemaIndexOutOfBoundsException
- if the column doesn't existpublic final Type getColumnType(String columnName)+
columnName
- name of the columnpublic final Type getColumnType(int columnIndex)+
columnIndex
- column index in the schemaIndexOutOfBoundsException
- if the column doesn't existpublic final Schema getSchema()+
protected final void checkValidColumn(int columnIndex)+
IndexOutOfBoundsException
- if the column doesn't existprotected final void checkNull(int columnIndex)+
IllegalArgumentException
- if the column is nullprotected final void checkType(int columnIndex, + Type... types)+
public String rowToString()+
public String toStringLongFormat()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public abstract class RowResultIterator +extends Object +implements Iterator<RowResult>, Iterable<RowResult>+
Modifier and Type | +Field and Description | +
---|---|
protected int |
+currentRow |
+
protected int |
+numRows |
+
protected Schema |
+schema |
+
Modifier and Type | +Method and Description | +
---|---|
static RowResultIterator |
+empty() |
+
long |
+getElapsedMillis()
+Get the number of milliseconds elapsed since the RPC was created up to the moment when this
+ response was created.
+ |
+
int |
+getNumRows() |
+
String |
+getTsUUID()
+Get the identifier of the tablet server that sent the response.
+ |
+
boolean |
+hasNext() |
+
Iterator<RowResult> |
+iterator() |
+
void |
+remove() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, next
forEach, spliterator
protected final Schema schema+
protected final int numRows+
protected int currentRow+
public int getNumRows()+
public static RowResultIterator empty()+
public boolean hasNext()+ +
public long getElapsedMillis()+
public String getTsUUID()+
null
if the RPC failed before tablet location lookup succeeded.@InterfaceAudience.Public + @InterfaceStability.Evolving +public static enum SessionConfiguration.FlushMode +extends Enum<SessionConfiguration.FlushMode>+
Enum Constant and Description | +
---|
AUTO_FLUSH_BACKGROUND
+KuduSession.apply() calls will return immediately, but the writes
+ will be sent in the background, potentially batched together with other writes from
+ the same session. |
+
AUTO_FLUSH_SYNC
+Each
+KuduSession.apply() call will return only after being
+ flushed to the server automatically. |
+
MANUAL_FLUSH
+KuduSession.apply() calls will return immediately, but the writes
+ will not be sent until the user calls KuduSession.flush() . |
+
Modifier and Type | +Method and Description | +
---|---|
static SessionConfiguration.FlushMode |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static SessionConfiguration.FlushMode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final SessionConfiguration.FlushMode AUTO_FLUSH_SYNC+
KuduSession.apply()
call will return only after being
+ flushed to the server automatically. No batching will occur.
+
+ In this mode, the KuduSession.flush()
call never has any effect, since each
+ KuduSession.apply()
has already flushed the buffer before
+ returning.
+
+
This is the default flush mode.
public static final SessionConfiguration.FlushMode AUTO_FLUSH_BACKGROUND+
KuduSession.apply()
calls will return immediately, but the writes
+ will be sent in the background, potentially batched together with other writes from
+ the same session. If there is not sufficient buffer space, then
+ KuduSession.apply()
may block for buffer space to be available.
+
+ Because writes are applied in the background, any errors will be stored
+ in a session-local buffer. Call countPendingErrors()
or
+ getPendingErrors()
to retrieve them.
+
+
Note: The AUTO_FLUSH_BACKGROUND
mode may result in
+ out-of-order writes to Kudu. This is because in this mode multiple write
+ operations may be sent to the server in parallel.
+ See KUDU-1767 for more
+ information.
+
+
The KuduSession.flush()
call can be used to block until the buffer is empty.
public static final SessionConfiguration.FlushMode MANUAL_FLUSH+
KuduSession.apply()
calls will return immediately, but the writes
+ will not be sent until the user calls KuduSession.flush()
. If the buffer runs past
+ the configured space limit, then KuduSession.apply()
will return
+ an error.public static SessionConfiguration.FlushMode[] values()+
+for (SessionConfiguration.FlushMode c : SessionConfiguration.FlushMode.values()) + System.out.println(c); +
public static SessionConfiguration.FlushMode valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@InterfaceAudience.Public
+ @InterfaceStability.Evolving
+public interface SessionConfiguration
+Modifier and Type | +Interface and Description | +
---|---|
static class |
+SessionConfiguration.FlushMode |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+countPendingErrors()
+Return the number of errors which are pending.
+ |
+
SessionConfiguration.FlushMode |
+getFlushMode()
+Get the current flush mode.
+ |
+
RowErrorsAndOverflowStatus |
+getPendingErrors()
+Return any errors from previous calls.
+ |
+
long |
+getTimeoutMillis()
+Get the current timeout.
+ |
+
ResourceMetrics |
+getWriteOpMetrics()
+Return cumulative write operation metrics since the beginning of the session.
+ |
+
boolean |
+hasPendingOperations()
+Check if there are operations that haven't been completely applied.
+ |
+
boolean |
+isClosed()
+Returns true if this session has already been closed.
+ |
+
boolean |
+isIgnoreAllDuplicateRows()
+Tells if the session is currently ignoring row errors when the whole list returned by a tablet
+ server is of the AlreadyPresent type.
+ |
+
boolean |
+isIgnoreAllNotFoundRows()
+Tells if the session is currently ignoring row errors when the whole list returned by a tablet
+ server is of the NotFound type.
+ |
+
void |
+setErrorCollectorSpace(int size)
+Set the number of errors that can be collected.
+ |
+
void |
+setExternalConsistencyMode(ExternalConsistencyMode consistencyMode)
+Set the new external consistency mode for this session.
+ |
+
void |
+setFlushInterval(int interval)
+Set the flush interval, which will be used for the next scheduling decision.
+ |
+
void |
+setFlushMode(SessionConfiguration.FlushMode flushMode)
+Set the new flush mode for this session.
+ |
+
void |
+setIgnoreAllDuplicateRows(boolean ignoreAllDuplicateRows)
+Configures the option to ignore all the row errors if they are all of the AlreadyPresent type.
+ |
+
void |
+setIgnoreAllNotFoundRows(boolean ignoreAllNotFoundRows)
+Configures the option to ignore all the row errors if they are all of the NotFound type.
+ |
+
void |
+setMutationBufferLowWatermark(float mutationBufferLowWatermarkPercentage)
+Deprecated.
+
+The low watermark no longer has any effect.
+ |
+
void |
+setMutationBufferSpace(int size)
+Set the number of operations that can be buffered.
+ |
+
void |
+setTimeoutMillis(long timeout)
+Sets the timeout for the next applied operations.
+ |
+
SessionConfiguration.FlushMode getFlushMode()+
AUTO_FLUSH_SYNC
by defaultvoid setFlushMode(SessionConfiguration.FlushMode flushMode)+
flushMode
- new flush mode, can be the same as the previous one.IllegalArgumentException
- if the buffer isn't empty.void setMutationBufferSpace(int size)+
size
- number of ops.IllegalArgumentException
- if the buffer isn't empty.@Deprecated +void setMutationBufferLowWatermark(float mutationBufferLowWatermarkPercentage)+
mutationBufferLowWatermarkPercentage
- a new low watermark as a percentage,
+ has to be between 0 and 1 (inclusive). A value of 1 disables
+ the low watermark since it's the same as the high oneIllegalArgumentException
- if the buffer isn't empty or if the watermark isn't between
+ 0 and 1void setFlushInterval(int interval)+
interval
- interval in milliseconds.long getTimeoutMillis()+
void setTimeoutMillis(long timeout)+
timeout
- Timeout in milliseconds.boolean isClosed()+
boolean hasPendingOperations()+
void setExternalConsistencyMode(ExternalConsistencyMode consistencyMode)+
consistencyMode
- new external consistency mode, can the same as the previous one.IllegalArgumentException
- if the buffer isn't empty.boolean isIgnoreAllDuplicateRows()+
void setIgnoreAllDuplicateRows(boolean ignoreAllDuplicateRows)+
Disabled by default.
ignoreAllDuplicateRows
- true if this session should enforce this, else falseboolean isIgnoreAllNotFoundRows()+
void setIgnoreAllNotFoundRows(boolean ignoreAllNotFoundRows)+
Disabled by default.
ignoreAllNotFoundRows
- true if this session should enforce this, else falsevoid setErrorCollectorSpace(int size)+
size
- number of errors.int countPendingErrors()+
AUTO_FLUSH_BACKGROUND
mode.RowErrorsAndOverflowStatus getPendingErrors()+
Clears the pending errors.
ResourceMetrics getWriteOpMetrics()+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public static enum Statistics.Statistic +extends Enum<Statistics.Statistic>+
Enum Constant and Description | +
---|
BYTES_WRITTEN
+How many bytes have been written by this client.
+ |
+
OPS_ERRORS
+How many operations have been sent to server but failed.
+ |
+
RPC_ERRORS
+How many rpcs have been sent to server but failed.
+ |
+
WRITE_OPS
+How many operations have been sent to server and succeeded.
+ |
+
WRITE_RPCS
+How many rpcs have been sent to server and succeeded.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static Statistics.Statistic |
+valueOf(String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Statistics.Statistic[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
public static final Statistics.Statistic BYTES_WRITTEN+
public static final Statistics.Statistic WRITE_OPS+
public static final Statistics.Statistic WRITE_RPCS+
public static final Statistics.Statistic OPS_ERRORS+
public static final Statistics.Statistic RPC_ERRORS+
public static Statistics.Statistic[] values()+
+for (Statistics.Statistic c : Statistics.Statistic.values()) + System.out.println(c); +
public static Statistics.Statistic valueOf(String name)+
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@InterfaceAudience.Public + @InterfaceStability.Evolving +public class Statistics +extends Object+
+ This class is thread-safe. The user can use it anywhere to get statistics of this + client. +
+ The method toString()
can be useful to get a dump of all the metrics aggregated
+ for all the tablets.
Modifier and Type | +Class and Description | +
---|---|
static class |
+Statistics.Statistic
+The statistic enum to pass when querying.
+ |
+
Constructor and Description | +
---|
Statistics() |
+
Modifier and Type | +Method and Description | +
---|---|
long |
+getClientStatistic(Statistics.Statistic statistic)
+Get the statistic count of the whole client.
+ |
+
String |
+getTableName(String tabletId)
+Get table name of the given tablet id.
+ |
+
Set<String> |
+getTableSet()
+Get the set of tables which have been written into by this client,
+ which have statistics information.
+ |
+
long |
+getTableStatistic(String tableName,
+ Statistics.Statistic statistic)
+Get the statistic count of this table.
+ |
+
Set<String> |
+getTabletSet()
+Get the set of tablets which have been written into by this client,
+ which have statistics information.
+ |
+
long |
+getTabletStatistic(String tabletId,
+ Statistics.Statistic statistic)
+Get the statistic count of this tablet.
+ |
+
String |
+toString() |
+
public long getTabletStatistic(String tabletId, + Statistics.Statistic statistic)+
tabletId
- the tablet's idstatistic
- the statistic type to getpublic long getTableStatistic(String tableName, + Statistics.Statistic statistic)+
tableName
- the table's namestatistic
- the statistic type to getpublic long getClientStatistic(Statistics.Statistic statistic)+
statistic
- the statistic type to getpublic Set<String> getTabletSet()+
public Set<String> getTableSet()+
public String getTableName(String tabletId)+
tabletId
- the tablet's id@InterfaceAudience.Public + @InterfaceStability.Evolving +public class Status +extends Object+
src/kudu/util/status.h
in the C++ codebase.Modifier and Type | +Method and Description | +
---|---|
static Status |
+Aborted(String msg) |
+
static Status |
+Aborted(String msg,
+ int posixCode) |
+
static Status |
+AlreadyPresent(String msg) |
+
static Status |
+AlreadyPresent(String msg,
+ int posixCode) |
+
static Status |
+ConfigurationError(String msg) |
+
static Status |
+ConfigurationError(String msg,
+ int posixCode) |
+
static Status |
+Corruption(String msg) |
+
static Status |
+Corruption(String msg,
+ int posixCode) |
+
static Status |
+EndOfFile(String msg) |
+
static Status |
+EndOfFile(String msg,
+ int posixCode) |
+
int |
+getPosixCode()
+Get the posix code associated with the error.
+ |
+
static Status |
+IllegalState(String msg) |
+
static Status |
+IllegalState(String msg,
+ int posixCode) |
+
static Status |
+Immutable(String msg) |
+
static Status |
+Immutable(String msg,
+ int posixCode) |
+
static Status |
+Incomplete(String msg) |
+
static Status |
+Incomplete(String msg,
+ int posixCode) |
+
static Status |
+InvalidArgument(String msg) |
+
static Status |
+InvalidArgument(String msg,
+ int posixCode) |
+
static Status |
+IOError(String msg) |
+
static Status |
+IOError(String msg,
+ int posixCode) |
+
boolean |
+isAborted() |
+
boolean |
+isAlreadyPresent() |
+
boolean |
+isConfigurationError() |
+
boolean |
+isCorruption() |
+
boolean |
+isEndOfFile() |
+
boolean |
+isIllegalState() |
+
boolean |
+isImmutable() |
+
boolean |
+isIncomplete() |
+
boolean |
+isInvalidArgument() |
+
boolean |
+isIOError() |
+
boolean |
+isNetworkError() |
+
boolean |
+isNotAuthorized() |
+
boolean |
+isNotFound() |
+
boolean |
+isNotSupported() |
+
boolean |
+isRemoteError() |
+
boolean |
+isRuntimeError() |
+
boolean |
+isServiceUnavailable() |
+
boolean |
+isTimedOut() |
+
boolean |
+isUninitialized() |
+
static Status |
+NetworkError(String msg) |
+
static Status |
+NetworkError(String msg,
+ int posixCode) |
+
static Status |
+NotAuthorized(String msg) |
+
static Status |
+NotAuthorized(String msg,
+ int posixCode) |
+
static Status |
+NotFound(String msg) |
+
static Status |
+NotFound(String msg,
+ int posixCode) |
+
static Status |
+NotSupported(String msg) |
+
static Status |
+NotSupported(String msg,
+ int posixCode) |
+
boolean |
+ok() |
+
static Status |
+OK() |
+
static Status |
+RemoteError(String msg) |
+
static Status |
+RemoteError(String msg,
+ int posixCode) |
+
static Status |
+RuntimeError(String msg) |
+
static Status |
+RuntimeError(String msg,
+ int posixCode) |
+
static Status |
+ServiceUnavailable(String msg) |
+
static Status |
+ServiceUnavailable(String msg,
+ int posixCode) |
+
static Status |
+TimedOut(String msg) |
+
static Status |
+TimedOut(String msg,
+ int posixCode) |
+
String |
+toString()
+Get a human-readable version of the Status message fit for logging or display.
+ |
+
static Status |
+Uninitialized(String msg) |
+
static Status |
+Uninitialized(String msg,
+ int posixCode) |
+
public static Status OK()+
public boolean ok()+
public boolean isCorruption()+
public boolean isNotFound()+
public boolean isNotSupported()+
public boolean isInvalidArgument()+
public boolean isIOError()+
public boolean isAlreadyPresent()+
public boolean isRuntimeError()+
public boolean isNetworkError()+
public boolean isIllegalState()+
public boolean isNotAuthorized()+
public boolean isAborted()+
public boolean isRemoteError()+
public boolean isServiceUnavailable()+
public boolean isTimedOut()+
public boolean isUninitialized()+
public boolean isConfigurationError()+
public boolean isIncomplete()+
public boolean isEndOfFile()+
public boolean isImmutable()+
public int getPosixCode()+
-1
if no posix code is set. Otherwise, returns the posix code.@InterfaceAudience.Public + @InterfaceStability.Evolving +public class Update +extends Operation+
MASTER_SERVICE_NAME, TABLET_SERVER_SERVICE_NAME, TXN_MANAGER_SERVICE_NAME
getRow, partitionKey, setRow
getExternalConsistencyMode, getTable, setExternalConsistencyMode, setPropagatedTimestamp, toString
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class UpdateIgnore +extends Operation+
MASTER_SERVICE_NAME, TABLET_SERVER_SERVICE_NAME, TXN_MANAGER_SERVICE_NAME
getRow, partitionKey, setRow
getExternalConsistencyMode, getTable, setExternalConsistencyMode, setPropagatedTimestamp, toString
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class Upsert +extends Operation+
MASTER_SERVICE_NAME, TABLET_SERVER_SERVICE_NAME, TXN_MANAGER_SERVICE_NAME
getRow, partitionKey, setRow
getExternalConsistencyMode, getTable, setExternalConsistencyMode, setPropagatedTimestamp, toString
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class UpsertIgnore +extends Operation+
MASTER_SERVICE_NAME, TABLET_SERVER_SERVICE_NAME, TXN_MANAGER_SERVICE_NAME
getRow, partitionKey, setRow
getExternalConsistencyMode, getTable, setExternalConsistencyMode, setPropagatedTimestamp, toString
Interface | +Description | +
---|---|
HasFailedRpcException | +
+ Interface implemented by
+KuduException s that can tell you which
+ RPC failed. |
+
SessionConfiguration | +
+ Interface that defines the methods used to configure a session.
+ |
+
Class | +Description | +
---|---|
AbstractKuduScannerBuilder<S extends AbstractKuduScannerBuilder<? super S,T>,T> | +
+ Abstract class to extend in order to create builders for scanners.
+ |
+
AlterTableOptions | +
+ This builder must be used to alter a table.
+ |
+
AlterTableResponse | ++ |
AsyncKuduClient | +
+ A fully asynchronous and thread-safe client for Kudu.
+ |
+
AsyncKuduClient.AsyncKuduClientBuilder | +
+ Builder class to use in order to connect to Kudu.
+ |
+
AsyncKuduScanner | +
+ Creates a scanner to read data from Kudu.
+ |
+
AsyncKuduScanner.AsyncKuduScannerBuilder | +
+ A Builder class to build
+AsyncKuduScanner . |
+
AsyncKuduSession | +
+ An
+AsyncKuduSession belongs to a specific AsyncKuduClient , and represents a
+ context in which all write data access should take place. |
+
ColumnRangePredicate | +Deprecated
+ use the
+KuduPredicate class instead. |
+
CreateTableOptions | +
+ This is a builder class for all the options that can be provided while creating a table.
+ |
+
Delete | +
+ Class of Operation for whole row removals.
+ |
+
DeleteIgnore | +
+ Class of Operation for whole row removals ignoring missing rows.
+ |
+
DeleteTableResponse | ++ |
Insert | +
+ Represents a single row insert.
+ |
+
InsertIgnore | +
+ Represents a single row insert ignoring duplicate rows.
+ |
+
IsAlterTableDoneResponse | +
+ Response to a isAlterTableDone command to use to know if an alter table is currently running on
+ the specified table.
+ |
+
IsCreateTableDoneResponse | +
+ Response to an isCreateTableDone command.
+ |
+
KuduClient | +
+ A synchronous and thread-safe client for Kudu.
+ |
+
KuduClient.KuduClientBuilder | +
+ Builder class to use in order to connect to Kudu.
+ |
+
KuduException.OriginalException | +
+ When exceptions are thrown by the asynchronous Kudu client, the stack trace is
+ typically deep within the internals of the Kudu client and/or Netty.
+ |
+
KuduPartitioner | +
+ A KuduPartitioner allows clients to determine the target partition of a
+ row without actually performing a write.
+ |
+
KuduPartitioner.KuduPartitionerBuilder | +
+ A Builder class to build
+KuduPartitioner . |
+
KuduPredicate | +
+ A predicate which can be used to filter rows based on the value of a column.
+ |
+
KuduScanner | +
+ Synchronous version of
+AsyncKuduScanner . |
+
KuduScanner.KuduScannerBuilder | +
+ A Builder class to build
+KuduScanner . |
+
KuduScannerIterator | +
+ An iterator for the RowResults of a KuduScanner.
+ |
+
KuduScanToken | +
+ A scan token describes a partial scan of a Kudu table limited to a single
+ contiguous physical location.
+ |
+
KuduScanToken.KuduScanTokenBuilder | +
+ Builds a sequence of scan tokens.
+ |
+
KuduSession | +
+ Synchronous version of
+AsyncKuduSession . |
+
KuduTable | +
+ A KuduTable represents a table on a particular cluster.
+ |
+
KuduTableStatistics | +
+ Represent statistics belongs to a specific kudu table.
+ |
+
KuduTransaction | +
+ A handle for a multi-row transaction in Kudu.
+ |
+
ListTablesResponse | ++ |
ListTabletServersResponse | ++ |
LocatedTablet | +
+ Information about the locations of tablets in a Kudu table.
+ |
+
LocatedTablet.Replica | +
+ One of the replicas of the tablet.
+ |
+
Operation | +
+ Base class for the RPCs that related to WriteRequestPB.
+ |
+
OperationResponse | ++ |
PartialRow | +
+ Class used to represent parts of a row along with its schema.
+ |
+
RangePartitionWithCustomHashSchema | +
+ This class represents a range partition with custom hash bucketing schema.
+ |
+
RecallDeletedTableResponse | ++ |
ResourceMetrics | +
+ A container for scanner resource metrics.
+ |
+
RowError | +
+ Wrapper class for a single row error.
+ |
+
RowErrorsAndOverflowStatus | +
+ Container class used as a response when retrieving pending row errors.
+ |
+
RowResult | +
+ RowResult represents one row from a scanner.
+ |
+
RowResultIterator | +
+ Class that contains the rows sent by a tablet server, exhausting this iterator only means
+ that all the rows from the last server response were read.
+ |
+
Statistics | +
+ A Statistics belongs to a specific AsyncKuduClient.
+ |
+
Status | +
+ Representation of an error code and message.
+ |
+
Update | +
+ Operation to update columns on an existing row.
+ |
+
UpdateIgnore | +
+ Represents a single row update ignoring missing rows errors and
+ errors on updating immutable cells.
+ |
+
Upsert | +
+ Represents a single row upsert.
+ |
+
UpsertIgnore | +
+ Represents a single row upsert ignoring errors on updating
+ immutable cells.
+ |
+
Enum | +Description | +
---|---|
AsyncKuduScanner.ReadMode | +
+ The possible read modes for scanners.
+ |
+
AsyncKuduScanner.RowDataFormat | +
+ Expected row data format in scanner result set.
+ |
+
ExternalConsistencyMode | +
+ The possible external consistency modes on which Kudu operates.
+ |
+
KuduPredicate.ComparisonOp | +
+ The comparison operator of a predicate.
+ |
+
RangePartitionBound | +
+ Specifies whether a range partition bound is inclusive or exclusive.
+ |
+
ReplicaSelection | +
+ Policy with which to choose amongst multiple replicas.
+ |
+
SessionConfiguration.FlushMode | ++ |
Statistics.Statistic | +
+ The statistic enum to pass when querying.
+ |
+
Exception | +Description | +
---|---|
KuduException | +
+ The parent class of all exceptions sent by the Kudu client.
+ |
+
PleaseThrottleException | +
+ This exception notifies the application to throttle its use of Kudu.
+ |
+
Class | +Description | +
---|---|
ColumnSchema | +
+ Represents a Kudu Table column.
+ |
+
ColumnSchema.AutoIncrementingColumnSchemaBuilder | +
+ Builder for ColumnSchema of the auto-incrementing column.
+ |
+
ColumnSchema.ColumnSchemaBuilder | +
+ Builder for ColumnSchema.
+ |
+
ColumnTypeAttributes | +
+ Represents a Kudu Table column's type attributes.
+ |
+
ColumnTypeAttributes.ColumnTypeAttributesBuilder | +
+ Builder for ColumnTypeAttributes.
+ |
+
Schema | +
+ Represents table's schema which is essentially a list of columns.
+ |
+
Enum | +Description | +
---|---|
ColumnSchema.CompressionAlgorithm | +
+ Specifies the compression algorithm of data for a column on disk.
+ |
+
ColumnSchema.Encoding | +
+ Specifies the encoding of data for a column on disk.
+ |
+
Type | +
+ Describes all the types available to build table schemas.
+ |
+
@InterfaceAudience.Public + @InterfaceStability.Evolving +public class BigLinkedListCommon +extends Object+
Modifier and Type | +Field and Description | +
---|---|
static String |
+COLUMN_CLIENT
+identifier of the mapred task that generated this row.
+ |
+
static int |
+COLUMN_CLIENT_IDX |
+
static String |
+COLUMN_KEY_ONE
+Row key, two times 8 bytes.
+ |
+
static int |
+COLUMN_KEY_ONE_IDX |
+
static String |
+COLUMN_KEY_TWO |
+
static int |
+COLUMN_KEY_TWO_IDX |
+
static String |
+COLUMN_PREV_ONE
+Link to the id of the prev node in the linked list, two times 8 bytes.
+ |
+
static int |
+COLUMN_PREV_ONE_IDX |
+
static String |
+COLUMN_PREV_TWO |
+
static int |
+COLUMN_PREV_TWO_IDX |
+
static String |
+COLUMN_ROW_ID
+the id of the row within the same client.
+ |
+
static int |
+COLUMN_ROW_ID_IDX |
+
static String |
+COLUMN_UPDATE_COUNT
+The number of times this row was updated.
+ |
+
static int |
+COLUMN_UPDATE_COUNT_IDX |
+
static String |
+DEFAULT_HEADS_TABLE_NAME |
+
static String |
+DEFAULT_TABLE_NAME |
+
static String |
+HEADS_TABLE_NAME_KEY |
+
static String |
+TABLE_NAME_KEY |
+
Modifier and Type | +Method and Description | +
---|---|
static CreateTableOptions |
+getCreateTableOptions(Schema schema,
+ int numReplicas,
+ int rangePartitions,
+ int hashPartitions) |
+
static Schema |
+getHeadsTableSchema() |
+
static Schema |
+getTableSchema() |
+
public static final String TABLE_NAME_KEY+
public static final String DEFAULT_TABLE_NAME+
public static final String HEADS_TABLE_NAME_KEY+
public static final String DEFAULT_HEADS_TABLE_NAME+
public static final String COLUMN_KEY_ONE+
public static final int COLUMN_KEY_ONE_IDX+
public static final String COLUMN_KEY_TWO+
public static final int COLUMN_KEY_TWO_IDX+
public static final String COLUMN_PREV_ONE+
public static final int COLUMN_PREV_ONE_IDX+
public static final String COLUMN_PREV_TWO+
public static final int COLUMN_PREV_TWO_IDX+
public static final String COLUMN_ROW_ID+
public static final int COLUMN_ROW_ID_IDX+
public static final String COLUMN_CLIENT+
public static final int COLUMN_CLIENT_IDX+
public static final String COLUMN_UPDATE_COUNT+
public static final int COLUMN_UPDATE_COUNT_IDX+
public static Schema getTableSchema()+
public static Schema getHeadsTableSchema()+
public static CreateTableOptions getCreateTableOptions(Schema schema, + int numReplicas, + int rangePartitions, + int hashPartitions)+
Class | +Description | +
---|---|
BigLinkedListCommon | +
+ Static constants, helper methods, and utility classes for BigLinkedList
+ implementations.
+ |
+
@InterfaceAudience.Public
+ @InterfaceStability.Evolving
+public class KuduTestHarness
+extends org.junit.rules.ExternalResource
++ public static class TestFoo { + + @Rule + public KuduTestHarness harness = new KuduTestHarness(); + + ... + } +
Modifier and Type | +Field and Description | +
---|---|
static int |
+DEFAULT_SLEEP |
+
Constructor and Description | +
---|
KuduTestHarness() |
+
KuduTestHarness(org.apache.kudu.test.cluster.MiniKuduCluster.MiniKuduClusterBuilder clusterBuilder) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+after() |
+
org.junit.runners.model.Statement |
+apply(org.junit.runners.model.Statement base,
+ org.junit.runner.Description description) |
+
void |
+before() |
+
String |
+createJwtFor(String accountId,
+ String subject,
+ boolean isValid) |
+
org.apache.kudu.client.HostAndPort |
+findLeaderMasterServer()
+Find the host and port of the leader master.
+ |
+
org.apache.kudu.client.HostAndPort |
+findLeaderTabletServer(LocatedTablet tablet)
+Finds the RPC port of the given tablet's leader tserver.
+ |
+
AsyncKuduClient |
+getAsyncClient() |
+
static org.apache.kudu.test.cluster.MiniKuduCluster.MiniKuduClusterBuilder |
+getBaseClusterBuilder()
+Returns the base MiniKuduClusterBuilder used when creating a
+ KuduTestHarness with the default constructor.
+ |
+
KuduClient |
+getClient() |
+
byte[] |
+getClusterCACertDer() |
+
String |
+getClusterRoot() |
+
String |
+getMasterAddressesAsString()
+Return the comma-separated list of "host:port" pairs that describes the master
+ config for this cluster.
+ |
+
List<org.apache.kudu.client.HostAndPort> |
+getMasterServers() |
+
String |
+getPrincipal() |
+
List<org.apache.kudu.client.HostAndPort> |
+getTabletServers() |
+
void |
+kdestroy()
+Removes all credentials for all principals from the Kerberos credential cache.
+ |
+
void |
+killAllMasterServers()
+Kills all the master servers.
+ |
+
void |
+killAllTabletServers()
+Kills all the tablet servers.
+ |
+
org.apache.kudu.client.HostAndPort |
+killLeaderMasterServer()
+Helper method to easily kill the leader master.
+ |
+
void |
+killTabletLeader(KuduTable table)
+Helper method to easily kill a tablet server that serves the given table's only tablet's
+ leader.
+ |
+
org.apache.kudu.client.HostAndPort |
+killTabletLeader(LocatedTablet tablet)
+Helper method to kill a tablet server that serves the given tablet's leader
+ replica.
+ |
+
org.apache.kudu.client.HostAndPort |
+killTabletLeader(org.apache.kudu.client.RemoteTablet tablet)
+Helper method to kill a tablet server that hosts the given tablet's leader
+ replica.
+ |
+
void |
+kinit(String username)
+Re-initialize Kerberos credentials for the given username, writing them
+ into the Kerberos credential cache.
+ |
+
org.apache.kudu.client.HostAndPort |
+pauseLeaderMaster()
+Finds and pauses the leader master.
+ |
+
void |
+pauseMaster(org.apache.kudu.client.HostAndPort hp)
+Pauses the specified master.
+ |
+
void |
+resetClients()
+Resets the clients so that their state is completely fresh, including meta
+ cache, connections, open tables, sessions and scanners, and propagated timestamp.
+ |
+
org.apache.kudu.client.HostAndPort |
+restartLeaderMaster()
+Kills and restarts the leader master.
+ |
+
void |
+restartTabletServer(KuduTable table)
+Picks at random a tablet server that serves tablets from the passed table and restarts it.
+ |
+
org.apache.kudu.client.HostAndPort |
+restartTabletServer(org.apache.kudu.client.RemoteTablet tablet)
+Kills a tablet server that serves the given tablet's leader and restarts it.
+ |
+
void |
+resumeMaster(org.apache.kudu.client.HostAndPort hp)
+Resumes the specified master.
+ |
+
void |
+startAllMasterServers()
+Starts all the master servers.
+ |
+
void |
+startAllTabletServers()
+Starts all the tablet servers.
+ |
+
void |
+startMaster(org.apache.kudu.client.HostAndPort hp)
+Start master which has previously been registered at the specified
+ host and port.
+ |
+
void |
+startTabletServer(org.apache.kudu.client.HostAndPort hp)
+Start tablet server which has previously been registered at the specified
+ host and port.
+ |
+
public static final int DEFAULT_SLEEP+
public KuduTestHarness(org.apache.kudu.test.cluster.MiniKuduCluster.MiniKuduClusterBuilder clusterBuilder)+
public KuduTestHarness()+
public static org.apache.kudu.test.cluster.MiniKuduCluster.MiniKuduClusterBuilder getBaseClusterBuilder()+
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, + org.junit.runner.Description description)+
apply
in interface org.junit.rules.TestRule
apply
in class org.junit.rules.ExternalResource
public void before() + throws Exception+
before
in class org.junit.rules.ExternalResource
Exception
public void after()+
after
in class org.junit.rules.ExternalResource
public KuduClient getClient()+
public AsyncKuduClient getAsyncClient()+
public void killTabletLeader(KuduTable table) + throws Exception+
table
- a KuduTable which will get its single tablet's leader killed.Exception
public org.apache.kudu.client.HostAndPort killTabletLeader(org.apache.kudu.client.RemoteTablet tablet) + throws Exception+
tablet
- a RemoteTablet which will get its leader killedException
- if no leader replica found after a few retries,
+ or if the tablet server isn't runningpublic org.apache.kudu.client.HostAndPort killTabletLeader(LocatedTablet tablet) + throws Exception+
tablet
- a LocatedTablet which will get its leader killedException
- if no leader replica found or if the tablet server isn't
+ runningpublic org.apache.kudu.client.HostAndPort findLeaderTabletServer(LocatedTablet tablet) + throws Exception+
tablet
- a LocatedTabletException
- if unable to find a tablet server with leader replicapublic void startTabletServer(org.apache.kudu.client.HostAndPort hp) + throws Exception+
hp
- host and port of the tablet server to start backException
public org.apache.kudu.client.HostAndPort findLeaderMasterServer() + throws Exception+
Exception
- if we are unable to find the leader masterpublic org.apache.kudu.client.HostAndPort killLeaderMasterServer() + throws Exception+
Exception
- if there is an error finding or killing the leader master.public void restartTabletServer(KuduTable table) + throws Exception+
table
- table to query for a TS to restartException
public org.apache.kudu.client.HostAndPort restartTabletServer(org.apache.kudu.client.RemoteTablet tablet) + throws Exception+
tablet
- a RemoteTablet which will get its leader killed and restartedException
public org.apache.kudu.client.HostAndPort restartLeaderMaster() + throws Exception+
Exception
public void startMaster(org.apache.kudu.client.HostAndPort hp) + throws Exception+
hp
- host and port of the master to start backException
public org.apache.kudu.client.HostAndPort pauseLeaderMaster() + throws Exception+
Exception
public void pauseMaster(org.apache.kudu.client.HostAndPort hp) + throws Exception+
Exception
public void resumeMaster(org.apache.kudu.client.HostAndPort hp) + throws Exception+
Exception
public String getMasterAddressesAsString()+
public List<org.apache.kudu.client.HostAndPort> getMasterServers()+
public List<org.apache.kudu.client.HostAndPort> getTabletServers()+
public String getClusterRoot()+
public String getPrincipal()+
public void killAllMasterServers() + throws IOException+
IOException
public void startAllMasterServers() + throws IOException+
IOException
public void killAllTabletServers() + throws IOException+
IOException
public void startAllTabletServers() + throws IOException+
IOException
public void kdestroy() + throws IOException+
IOException
public void kinit(String username) + throws IOException+
username
- the username to kinit asIOException
public void resetClients() + throws IOException+
IOException
public String createJwtFor(String accountId, + String subject, + boolean isValid) + throws IOException+
IOException
public byte[] getClusterCACertDer() + throws IOException+
IOException
Class | +Description | +
---|---|
KuduTestHarness | +
+ A Junit Rule that manages a Kudu cluster and clients for testing.
+ |
+
@InterfaceAudience.Public + @InterfaceStability.Unstable + @NotThreadSafe +public class BloomFilter +extends Object+
It can be used to filter all the records which are wanted, but doesn't guarantee to filter out + all the records which are not wanted. + +
Please check this wiki for more details. + +
The BloomFilter
here is a scanning filter and used to constrain the number of records
+ returned from TServer. It provides different types of put
methods. When you put
a
+ record into BloomFilter
, it means you expect the TServer to return records with
+ the same value in a scan.
+
+
Here is an example for use: +
+
+ BloomFilter bf = BloomFilter.BySizeAndFPRate(numBytes);
+ bf.put(1);
+ bf.put(3);
+ bf.put(4);
+ byte[] bitSet = bf.getBitSet();
+ byte[] numHashes = bf.getNumHashes();
+ String hashFunctionName = bf.getHashFunctionName();
+ // TODO: implement the interface for serializing and sending
+ // (bitSet, numHashes, hashFunctionName) to TServer.
+
+
Modifier and Type | +Method and Description | +
---|---|
static BloomFilter |
+byCount(int expectedCount)
+Generate bloom filter, default hashing is
+Murmur2 and false positive rate is 0.01. |
+
static BloomFilter |
+byCountAndFPRate(int expectedCount,
+ double fpRate)
+Generate bloom filter, default hashing is
+Murmur2 . |
+
static BloomFilter |
+byCountAndFPRate(int expectedCount,
+ double fpRate,
+ org.apache.kudu.util.BloomFilter.HashFunction hashFunction)
+Generate bloom filter.
+ |
+
static BloomFilter |
+bySize(int numBytes)
+Generate bloom filter, default hashing is
+Murmur2 and false positive rate is 0.01. |
+
static BloomFilter |
+bySizeAndFPRate(int numBytes,
+ double fpRate)
+Generate bloom filter, default hashing is
+Murmur2 . |
+
static BloomFilter |
+bySizeAndFPRate(int numBytes,
+ double fpRate,
+ org.apache.kudu.util.BloomFilter.HashFunction hashFunction)
+Generate bloom filter.
+ |
+
byte[] |
+getBitSet()
+Get the internal bit set in bytes.
+ |
+
String |
+getHashFunctionName()
+Get the name of hashing used when updating or checking containment.
+ |
+
int |
+getNumHashes()
+Get the number of hashing times when updating or checking containment.
+ |
+
void |
+put(boolean data)
+Update bloom filter with a
+boolean . |
+
void |
+put(byte data)
+Update bloom filter with a
+byte . |
+
void |
+put(byte[] data)
+Update bloom filter with a
+byte[] . |
+
void |
+put(double data)
+Update bloom filter with a
+double . |
+
void |
+put(float data)
+Update bloom filter with a
+float . |
+
void |
+put(int data)
+Update bloom filter with a
+int . |
+
void |
+put(long data)
+Update bloom filter with a
+long . |
+
void |
+put(short data)
+Update bloom filter with a
+short . |
+
void |
+put(String data)
+Update bloom filter with a
+String . |
+
String |
+toString() |
+
public static BloomFilter bySize(int numBytes)+
Murmur2
and false positive rate is 0.01.numBytes
- size of bloom filter in bytespublic static BloomFilter bySizeAndFPRate(int numBytes, + double fpRate)+
Murmur2
.numBytes
- size of bloom filter in bytesfpRate
- the probability that TServer will erroneously return a record that has not
+ ever been put
into the BloomFilter
.public static BloomFilter bySizeAndFPRate(int numBytes, + double fpRate, + org.apache.kudu.util.BloomFilter.HashFunction hashFunction)+
numBytes
- size of bloom filter in bytesfpRate
- the probability that TServer will erroneously return a record that has not
+ ever been put
into the BloomFilter
.hashFunction
- hashing used when updating or checking containment, user should pick
+ the hashing function from HashFunctions
public static BloomFilter byCount(int expectedCount)+
Murmur2
and false positive rate is 0.01.expectedCount
- The expected number of elements, targeted by this bloom filter.
+ It is used to size the bloom filter.public static BloomFilter byCountAndFPRate(int expectedCount, + double fpRate)+
Murmur2
.expectedCount
- The expected number of elements, targeted by this bloom filter.
+ It is used to size the bloom filter.fpRate
- the probability that TServer will erroneously return a record that has not
+ ever been put
into the BloomFilter
.public static BloomFilter byCountAndFPRate(int expectedCount, + double fpRate, + org.apache.kudu.util.BloomFilter.HashFunction hashFunction)+
expectedCount
- The expected number of elements, targeted by this bloom filter.
+ It is used to size the bloom filter.fpRate
- the probability that TServer will erroneously return a record that has not
+ ever been put
into the BloomFilter
.hashFunction
- hashing used when updating or checking containment, user should pick
+ the hashing function from HashFunctions
public void put(byte[] data)+
byte[]
.public void put(boolean data)+
boolean
.public void put(byte data)+
byte
.public void put(short data)+
short
.public void put(int data)+
int
.public void put(long data)+
long
.public void put(float data)+
float
.public void put(double data)+
double
.public void put(String data)+
String
.public byte[] getBitSet()+
public int getNumHashes()+
public String getHashFunctionName()+
Class | +Description | +
---|---|
BloomFilter | +
+ An space-efficient filter which offers an approximate containment check.
+ |
+
+ + diff --git a/releases/1.17.1/apidocs/overview-summary.html b/releases/1.17.1/apidocs/overview-summary.html new file mode 100644 index 0000000000..26ff6118b5 --- /dev/null +++ b/releases/1.17.1/apidocs/overview-summary.html @@ -0,0 +1,148 @@ + + + + + +
Package | +Description | +
---|---|
org.apache.kudu | ++ |
org.apache.kudu.client | ++ |
org.apache.kudu.spark.tools | ++ |
org.apache.kudu.test | ++ |
org.apache.kudu.util | ++ |
Status status+
+ Kudu C++ client API
+
+ |
+
▼Nkudu | |
▼Nclient | |
▼Ninternal | |
CAsyncLeaderMasterRpc | |
CAsyncRandomTxnManagerRpc | |
CKuduLoggingCallback | The interface for all logging callbacks |
CKuduLoggingMemberCallback | The logging callback that invokes a member function of an object |
CKuduLoggingFunctionCallback | The logging callback that invokes a function by pointer with a single argument |
CKuduStatusCallback | The interface for all status callbacks |
CKuduStatusMemberCallback | The status callback that invokes a member function of an object |
CKuduStatusFunctionCallback | The status callback that invokes a function by pointer with a single argument |
CKuduClientBuilder | A "factory" for KuduClient objects |
▼CKuduTransaction | |
CSerializationOptions | |
CKuduClient | A handle for a connection to a cluster |
CKuduTabletServer | In-memory representation of a remote tablet server |
CKuduReplica | In-memory representation of a remote tablet's replica |
CKuduTablet | In-memory representation of a remote tablet |
CKuduTableCreator | A helper class to create a new table with the desired options |
CKuduRangePartition | |
CKuduTableStatistics | In-memory statistics of table |
CKuduTable | A representation of a table on a particular cluster |
CKuduTableAlterer | Alters an existing table based on the provided steps |
CKuduError | This class represents an error which occurred in a write operation |
CKuduSession | Representation of a Kudu client session |
CKuduScanner | This class is a representation of a single scan |
CKuduScanToken | A scan descriptor limited to a single physical contiguous location |
CKuduScanTokenBuilder | Builds scan tokens for a table |
CKuduPartitionerBuilder | Builder for Partitioner instances |
CKuduPartitioner | |
CKuduColumnarScanBatch | A batch of columnar data returned from a scanner |
CResourceMetrics | A generic catalog of simple metrics |
CKuduScanBatch | A batch of zero or more rows returned by a scan operation |
CKuduPredicate | A representation of comparison predicate for Kudu queries |
CKuduBloomFilter | Bloom filter to be used with IN Bloom filter predicate |
CKuduBloomFilterBuilder | Builder class to help build KuduBloomFilter to be used with IN Bloom filter predicate |
CKuduColumnTypeAttributes | Representation of column type attributes |
CKuduColumnStorageAttributes | Representation of column storage attributes |
CKuduColumnSchema | Representation of the column schema |
CKuduColumnSpec | Builder API for specifying or altering a column within a table schema |
CKuduSchemaBuilder | Builder API for constructing a KuduSchema object |
CKuduSchema | A representation of a table's schema |
CKuduValue | A constant cell value with a specific type |
CKuduWriteOperation | A single-row write operation to be sent to a Kudu table |
CKuduInsert | A single row insert to be sent to the cluster |
CKuduInsertIgnore | A single row insert ignore to be sent to the cluster, duplicate row errors are ignored |
CKuduUpsert | A single row upsert to be sent to the cluster |
CKuduUpsertIgnore | A single row upsert ignore to be sent to the cluster, errors on updating immutable cells are ignored |
CKuduUpdate | A single row update to be sent to the cluster |
CKuduUpdateIgnore | A single row update ignore to be sent to the cluster, missing row errors and errors on updating immutable cells are ignored |
CKuduDelete | A single row delete to be sent to the cluster |
CKuduDeleteIgnore | A single row delete ignore to be sent to the cluster |
▼Ninternal_logging | |
CNullLog | A helper for the nil log sink |
CCerrLog | A helper for stderr log sink |
CMonoDelta | A representation of a time interval |
CMonoTime | Representation of a particular point in time |
▼CSlice | A wrapper around externally allocated data |
CComparator | Comparator struct, useful for ordered collections (like STL maps) |
CSliceMap | STL map whose keys are Slices |
CStatus | A representation of an operation's outcome |
CKuduPartialRow | A row which may only contain values for a subset of the columns |
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for KuduPartialRow, including all inherited members.
+AllColumnsSet() const | KuduPartialRow | |
EncodeRowKey(std::string *encoded_key) const | KuduPartialRow | |
GetBinary(const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetBinary(int col_idx, Slice *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetBool(const Slice &col_name, bool *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetBool(int col_idx, bool *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetDate(const Slice &col_name, int32_t *days_since_unix_epoch) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetDate(int col_idx, int32_t *days_since_unix_epoch) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetDouble(const Slice &col_name, double *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetDouble(int col_idx, double *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetFloat(const Slice &col_name, float *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetFloat(int col_idx, float *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetInt16(const Slice &col_name, int16_t *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetInt16(int col_idx, int16_t *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetInt32(const Slice &col_name, int32_t *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetInt32(int col_idx, int32_t *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetInt64(const Slice &col_name, int64_t *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetInt64(int col_idx, int64_t *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetInt8(const Slice &col_name, int8_t *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetInt8(int col_idx, int8_t *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetSerial(const Slice &col_name, uint64_t *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetSerial(int col_idx, uint64_t *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetString(const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetString(int col_idx, Slice *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetUnixTimeMicros(const Slice &col_name, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetUnixTimeMicros(int col_idx, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetVarchar(const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
GetVarchar(int col_idx, Slice *val) const WARN_UNUSED_RESULT | KuduPartialRow | |
IsAutoIncrementingColumnSet() const | KuduPartialRow | |
IsColumnSet(const Slice &col_name) const | KuduPartialRow | |
IsColumnSet(int col_idx) const | KuduPartialRow | |
IsKeySet() const | KuduPartialRow | |
IsNonUniqueKeySet() const | KuduPartialRow | |
IsNull(const Slice &col_name) const | KuduPartialRow | |
IsNull(int col_idx) const | KuduPartialRow | |
KuduPartialRow(const Schema *schema) | KuduPartialRow | explicit |
KuduPartialRow(const KuduPartialRow &other) | KuduPartialRow | |
operator=(KuduPartialRow other) | KuduPartialRow | |
schema() const | KuduPartialRow | inline |
SetBinary(const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetBinary(int col_idx, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetBinaryCopy(const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetBinaryCopy(int col_idx, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetBinaryNoCopy(const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetBinaryNoCopy(int col_idx, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetBool(const Slice &col_name, bool val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetBool(int col_idx, bool val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetDate(const Slice &col_name, int32_t days_since_unix_epoch) WARN_UNUSED_RESULT | KuduPartialRow | |
SetDate(int col_idx, int32_t days_since_unix_epoch) WARN_UNUSED_RESULT | KuduPartialRow | |
SetDouble(const Slice &col_name, double val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetDouble(int col_idx, double val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetFloat(const Slice &col_name, float val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetFloat(int col_idx, float val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetInt16(const Slice &col_name, int16_t val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetInt16(int col_idx, int16_t val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetInt32(const Slice &col_name, int32_t val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetInt32(int col_idx, int32_t val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetInt64(const Slice &col_name, int64_t val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetInt64(int col_idx, int64_t val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetInt8(const Slice &col_name, int8_t val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetInt8(int col_idx, int8_t val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetNull(const Slice &col_name) WARN_UNUSED_RESULT | KuduPartialRow | |
SetNull(int col_idx) WARN_UNUSED_RESULT | KuduPartialRow | |
SetSerial(const Slice &col_name, uint64_t val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetSerial(int col_idx, uint64_t val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetString(const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetString(int col_idx, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetStringCopy(const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetStringCopy(int col_idx, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetStringNoCopy(const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetStringNoCopy(int col_idx, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetUnixTimeMicros(const Slice &col_name, int64_t micros_since_utc_epoch) WARN_UNUSED_RESULT | KuduPartialRow | |
SetUnixTimeMicros(int col_idx, int64_t micros_since_utc_epoch) WARN_UNUSED_RESULT | KuduPartialRow | |
SetVarchar(const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetVarchar(int col_idx, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetVarcharNoCopyUnsafe(const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
SetVarcharNoCopyUnsafe(int col_idx, const Slice &val) WARN_UNUSED_RESULT | KuduPartialRow | |
ToEncodedRowKeyOrDie() const | KuduPartialRow | |
ToString() const | KuduPartialRow | |
Unset(const Slice &col_name) WARN_UNUSED_RESULT | KuduPartialRow | |
Unset(int col_idx) WARN_UNUSED_RESULT | KuduPartialRow | |
~KuduPartialRow() (defined in KuduPartialRow) | KuduPartialRow | virtual |
+ Kudu C++ client API
+
+ |
+
A row which may only contain values for a subset of the columns. + More...
+ +#include <partial_row.h>
+Public Member Functions | |
KuduPartialRow (const Schema *schema) | |
KuduPartialRow (const KuduPartialRow &other) | |
KuduPartialRow & | operator= (KuduPartialRow other) |
Status | SetVarchar (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetVarchar (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Status | SetNull (const Slice &col_name) WARN_UNUSED_RESULT |
Status | SetNull (int col_idx) WARN_UNUSED_RESULT |
Status | Unset (const Slice &col_name) WARN_UNUSED_RESULT |
Status | Unset (int col_idx) WARN_UNUSED_RESULT |
bool | IsColumnSet (const Slice &col_name) const |
bool | IsColumnSet (int col_idx) const |
bool | IsNull (const Slice &col_name) const |
bool | IsNull (int col_idx) const |
Status | EncodeRowKey (std::string *encoded_key) const |
std::string | ToEncodedRowKeyOrDie () const |
bool | IsKeySet () const |
bool | IsNonUniqueKeySet () const |
bool | IsAutoIncrementingColumnSet () const |
bool | AllColumnsSet () const |
std::string | ToString () const |
const Schema * | schema () const |
Setters for integral type columns by name. | |
Status | SetBool (const Slice &col_name, bool val) WARN_UNUSED_RESULT |
Status | SetInt8 (const Slice &col_name, int8_t val) WARN_UNUSED_RESULT |
Status | SetInt16 (const Slice &col_name, int16_t val) WARN_UNUSED_RESULT |
Status | SetInt32 (const Slice &col_name, int32_t val) WARN_UNUSED_RESULT |
Status | SetInt64 (const Slice &col_name, int64_t val) WARN_UNUSED_RESULT |
Status | SetSerial (const Slice &col_name, uint64_t val) WARN_UNUSED_RESULT |
Status | SetUnixTimeMicros (const Slice &col_name, int64_t micros_since_utc_epoch) WARN_UNUSED_RESULT |
Status | SetDate (const Slice &col_name, int32_t days_since_unix_epoch) WARN_UNUSED_RESULT |
Status | SetFloat (const Slice &col_name, float val) WARN_UNUSED_RESULT |
Status | SetDouble (const Slice &col_name, double val) WARN_UNUSED_RESULT |
Setters for integral type columns by index. | |
These setters are the same as corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders). + | |
Status | SetBool (int col_idx, bool val) WARN_UNUSED_RESULT |
Status | SetInt8 (int col_idx, int8_t val) WARN_UNUSED_RESULT |
Status | SetInt16 (int col_idx, int16_t val) WARN_UNUSED_RESULT |
Status | SetInt32 (int col_idx, int32_t val) WARN_UNUSED_RESULT |
Status | SetInt64 (int col_idx, int64_t val) WARN_UNUSED_RESULT |
Status | SetSerial (int col_idx, uint64_t val) WARN_UNUSED_RESULT |
Status | SetUnixTimeMicros (int col_idx, int64_t micros_since_utc_epoch) WARN_UNUSED_RESULT |
Status | SetDate (int col_idx, int32_t days_since_unix_epoch) WARN_UNUSED_RESULT |
Status | SetFloat (int col_idx, float val) WARN_UNUSED_RESULT |
Status | SetDouble (int col_idx, double val) WARN_UNUSED_RESULT |
Setters for binary/string columns by name (copying). | |
Status | SetBinary (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetString (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetBinaryCopy (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetStringCopy (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Setters for binary/string columns by index (copying). | |
Status | SetBinary (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Status | SetString (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Status | SetStringCopy (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Status | SetBinaryCopy (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Setters for binary/string columns by name (non-copying). | |
Status | SetBinaryNoCopy (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetStringNoCopy (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Advanced/Unstable API | |
There are no guarantees that the validation performed by these methods for 'val' will not change. + | |
Status | SetVarcharNoCopyUnsafe (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetVarcharNoCopyUnsafe (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Setters for binary/string columns by index (non-copying). | |
Status | SetBinaryNoCopy (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Status | SetStringNoCopy (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Getters for integral type columns by column name. | |
Status | GetBool (const Slice &col_name, bool *val) const WARN_UNUSED_RESULT |
Status | GetInt8 (const Slice &col_name, int8_t *val) const WARN_UNUSED_RESULT |
Status | GetInt16 (const Slice &col_name, int16_t *val) const WARN_UNUSED_RESULT |
Status | GetInt32 (const Slice &col_name, int32_t *val) const WARN_UNUSED_RESULT |
Status | GetInt64 (const Slice &col_name, int64_t *val) const WARN_UNUSED_RESULT |
Status | GetSerial (const Slice &col_name, uint64_t *val) const WARN_UNUSED_RESULT |
Status | GetUnixTimeMicros (const Slice &col_name, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT |
Status | GetDate (const Slice &col_name, int32_t *days_since_unix_epoch) const WARN_UNUSED_RESULT |
Status | GetFloat (const Slice &col_name, float *val) const WARN_UNUSED_RESULT |
Status | GetDouble (const Slice &col_name, double *val) const WARN_UNUSED_RESULT |
Getters for column of integral type by column index. | |
These getters are the same as the corresponding column-name-based getters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders). + | |
Status | GetBool (int col_idx, bool *val) const WARN_UNUSED_RESULT |
Status | GetInt8 (int col_idx, int8_t *val) const WARN_UNUSED_RESULT |
Status | GetInt16 (int col_idx, int16_t *val) const WARN_UNUSED_RESULT |
Status | GetInt32 (int col_idx, int32_t *val) const WARN_UNUSED_RESULT |
Status | GetInt64 (int col_idx, int64_t *val) const WARN_UNUSED_RESULT |
Status | GetSerial (int col_idx, uint64_t *val) const WARN_UNUSED_RESULT |
Status | GetUnixTimeMicros (int col_idx, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT |
Status | GetDate (int col_idx, int32_t *days_since_unix_epoch) const WARN_UNUSED_RESULT |
Status | GetFloat (int col_idx, float *val) const WARN_UNUSED_RESULT |
Status | GetDouble (int col_idx, double *val) const WARN_UNUSED_RESULT |
Getters for string/binary/varchar column by column name. | |
Status | GetString (const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT |
Status | GetBinary (const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT |
Status | GetVarchar (const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT |
Getters for string/binary/varchar column by column index. | |
Status | GetString (int col_idx, Slice *val) const WARN_UNUSED_RESULT |
Status | GetBinary (int col_idx, Slice *val) const WARN_UNUSED_RESULT |
Status | GetVarchar (int col_idx, Slice *val) const WARN_UNUSED_RESULT |
A row which may only contain values for a subset of the columns.
+This object contains a normal contiguous row, plus a bitfield indicating which columns have been set. Additionally, this type may optionally own copies of indirect data for variable length columns.
+
+
|
+ +explicit | +
[in] | schema | Schema to use for the row. The given Schema object must remain valid for the lifetime of this row. |
KuduPartialRow::KuduPartialRow | +( | +const KuduPartialRow & | +other | ) | ++ |
Create a copy of KuduPartialRow instance.
+[in] | other | KuduPartialRow instance to copy from. |
bool KuduPartialRow::AllColumnsSet | +( | +) | +const | +
true
if all column values have been set. Status KuduPartialRow::EncodeRowKey | +( | +std::string * | +encoded_key | ) | +const | +
Encode a row key.
+The result is suitable for use as a tablet split key, an encoded key range, etc.
+[out] | encoded_key | The encoded key (i.e. the result of the encoding). |
Status KuduPartialRow::GetBinary | +( | +const Slice & | +col_name, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its name.
+[in] | col_name | Name of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status KuduPartialRow::GetBinary | +( | +int | +col_idx, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its index.
+These methods are faster than their name-based counterparts since they use indices to avoid hashmap lookups, so index-based getters should be preferred in performance-sensitive code.
+[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status KuduPartialRow::GetBool | +( | +const Slice & | +col_name, | +
+ | + | bool * | +val | +
+ | ) | +const | +
Get value of the column specified by name.
+[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetBool | +( | +int | +col_idx, | +
+ | + | bool * | +val | +
+ | ) | +const | +
Get value of a column of integral type by column index.
+[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetDate | +( | +const Slice & | +col_name, | +
+ | + | int32_t * | +days_since_unix_epoch | +
+ | ) | +const | +
[in] | col_name | The name of the column. |
[out] | days_since_unix_epoch | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetDate | +( | +int | +col_idx, | +
+ | + | int32_t * | +days_since_unix_epoch | +
+ | ) | +const | +
[in] | col_idx | The index of the target column. |
[out] | days_since_unix_epoch | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetDouble | +( | +const Slice & | +col_name, | +
+ | + | double * | +val | +
+ | ) | +const | +
Get value of the column specified by name.
+[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetDouble | +( | +int | +col_idx, | +
+ | + | double * | +val | +
+ | ) | +const | +
Get value of a column of integral type by column index.
+[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetFloat | +( | +const Slice & | +col_name, | +
+ | + | float * | +val | +
+ | ) | +const | +
Get value of the column specified by name.
+[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetFloat | +( | +int | +col_idx, | +
+ | + | float * | +val | +
+ | ) | +const | +
Get value of a column of integral type by column index.
+[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetInt16 | +( | +const Slice & | +col_name, | +
+ | + | int16_t * | +val | +
+ | ) | +const | +
Get value of the column specified by name.
+[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetInt16 | +( | +int | +col_idx, | +
+ | + | int16_t * | +val | +
+ | ) | +const | +
Get value of a column of integral type by column index.
+[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetInt32 | +( | +const Slice & | +col_name, | +
+ | + | int32_t * | +val | +
+ | ) | +const | +
Get value of the column specified by name.
+[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetInt32 | +( | +int | +col_idx, | +
+ | + | int32_t * | +val | +
+ | ) | +const | +
Get value of a column of integral type by column index.
+[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetInt64 | +( | +const Slice & | +col_name, | +
+ | + | int64_t * | +val | +
+ | ) | +const | +
Get value of the column specified by name.
+[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetInt64 | +( | +int | +col_idx, | +
+ | + | int64_t * | +val | +
+ | ) | +const | +
Get value of a column of integral type by column index.
+[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetInt8 | +( | +const Slice & | +col_name, | +
+ | + | int8_t * | +val | +
+ | ) | +const | +
Get value of the column specified by name.
+[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetInt8 | +( | +int | +col_idx, | +
+ | + | int8_t * | +val | +
+ | ) | +const | +
Get value of a column of integral type by column index.
+[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetSerial | +( | +const Slice & | +col_name, | +
+ | + | uint64_t * | +val | +
+ | ) | +const | +
Get value of the column specified by name.
+[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetSerial | +( | +int | +col_idx, | +
+ | + | uint64_t * | +val | +
+ | ) | +const | +
Get value of a column of integral type by column index.
+[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetString | +( | +const Slice & | +col_name, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its name.
+[in] | col_name | Name of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status KuduPartialRow::GetString | +( | +int | +col_idx, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its index.
+These methods are faster than their name-based counterparts since they use indices to avoid hashmap lookups, so index-based getters should be preferred in performance-sensitive code.
+[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status KuduPartialRow::GetUnixTimeMicros | +( | +const Slice & | +col_name, | +
+ | + | int64_t * | +micros_since_utc_epoch | +
+ | ) | +const | +
[in] | col_name | The name of the column. |
[out] | micros_since_utc_epoch | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetUnixTimeMicros | +( | +int | +col_idx, | +
+ | + | int64_t * | +micros_since_utc_epoch | +
+ | ) | +const | +
[in] | col_idx | The index of the target column. |
[out] | micros_since_utc_epoch | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetVarchar | +( | +const Slice & | +col_name, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its name.
+[in] | col_name | Name of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status KuduPartialRow::GetVarchar | +( | +int | +col_idx, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its index.
+These methods are faster than their name-based counterparts since they use indices to avoid hashmap lookups, so index-based getters should be preferred in performance-sensitive code.
+[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. bool KuduPartialRow::IsAutoIncrementingColumnSet | +( | +) | +const | +
true
if auto-incrementing column has been set for this mutation. bool KuduPartialRow::IsColumnSet | +( | +const Slice & | +col_name | ) | +const | +
Check whether the specified column is set for the row.
+[in] | col_name | Name of the column. |
true
iff the given column has been specified. bool KuduPartialRow::IsColumnSet | +( | +int | +col_idx | ) | +const | +
Check whether the specified column is set for the row.
+[in] | col_idx | The index of the column. |
true
iff the given column has been specified. bool KuduPartialRow::IsKeySet | +( | +) | +const | +
true
if all key column values have been set for this mutation. bool KuduPartialRow::IsNonUniqueKeySet | +( | +) | +const | +
true
if all non-unique key column values have been set for this mutation. bool KuduPartialRow::IsNull | +( | +const Slice & | +col_name | ) | +const | +
Check whether the specified column is NULL
for the row.
[in] | col_name | Name of the target column. |
true
iff the given column's value is NULL
. bool KuduPartialRow::IsNull | +( | +int | +col_idx | ) | +const | +
Check whether the specified column is NULL
for the row.
[in] | col_idx | The index of the column. |
true
iff the given column's value is NULL
. KuduPartialRow& KuduPartialRow::operator= | +( | +KuduPartialRow | +other | ) | ++ |
Overwrite this KuduPartialRow instance with data from other instance.
+[in] | other | KuduPartialRow instance to assign from. |
+
|
+ +inline | +
Status KuduPartialRow::SetBinary | +( | +const Slice & | +col_name, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by name, copying the specified data immediately.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBinary | +( | +int | +col_idx, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by index, copying the specified data immediately.
+These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
+[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBinaryCopy | +( | +const Slice & | +col_name, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by name, copying the specified data immediately.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBinaryCopy | +( | +int | +col_idx, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by index, copying the specified data immediately.
+These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
+[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBinaryNoCopy | +( | +const Slice & | +col_name, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by name, not copying the specified data.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBinaryNoCopy | +( | +int | +col_idx, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by index, not copying the specified data.
+These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
+[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBool | +( | +const Slice & | +col_name, | +
+ | + | bool | +val | +
+ | ) | ++ |
Set value for a column by name.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBool | +( | +int | +col_idx, | +
+ | + | bool | +val | +
+ | ) | ++ |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetDate | +( | +const Slice & | +col_name, | +
+ | + | int32_t | +days_since_unix_epoch | +
+ | ) | ++ |
Set value for a column by name.
+[in] | col_name | Name of the target column. |
[in] | days_since_unix_epoch | The value to set. |
Status KuduPartialRow::SetDate | +( | +int | +col_idx, | +
+ | + | int32_t | +days_since_unix_epoch | +
+ | ) | ++ |
[in] | col_idx | The index of the target column. |
[in] | days_since_unix_epoch | The value to set. |
Status KuduPartialRow::SetDouble | +( | +const Slice & | +col_name, | +
+ | + | double | +val | +
+ | ) | ++ |
Set value for a column by name.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetDouble | +( | +int | +col_idx, | +
+ | + | double | +val | +
+ | ) | ++ |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetFloat | +( | +const Slice & | +col_name, | +
+ | + | float | +val | +
+ | ) | ++ |
Set value for a column by name.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetFloat | +( | +int | +col_idx, | +
+ | + | float | +val | +
+ | ) | ++ |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt16 | +( | +const Slice & | +col_name, | +
+ | + | int16_t | +val | +
+ | ) | ++ |
Set value for a column by name.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt16 | +( | +int | +col_idx, | +
+ | + | int16_t | +val | +
+ | ) | ++ |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt32 | +( | +const Slice & | +col_name, | +
+ | + | int32_t | +val | +
+ | ) | ++ |
Set value for a column by name.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt32 | +( | +int | +col_idx, | +
+ | + | int32_t | +val | +
+ | ) | ++ |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt64 | +( | +const Slice & | +col_name, | +
+ | + | int64_t | +val | +
+ | ) | ++ |
Set value for a column by name.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt64 | +( | +int | +col_idx, | +
+ | + | int64_t | +val | +
+ | ) | ++ |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt8 | +( | +const Slice & | +col_name, | +
+ | + | int8_t | +val | +
+ | ) | ++ |
Set value for a column by name.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt8 | +( | +int | +col_idx, | +
+ | + | int8_t | +val | +
+ | ) | ++ |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetNull | +( | +const Slice & | +col_name | ) | ++ |
Set column value to NULL
; the column is identified by its name.
This will only succeed on nullable columns. Use Unset() to restore column value to its default.
+[in] | col_name | Name of the target column. |
Status KuduPartialRow::SetNull | +( | +int | +col_idx | ) | ++ |
Set column value to NULL
; the column is identified by its index.
This will only succeed on nullable columns. Use Unset() to restore column value to its default.
+[in] | col_idx | The index of the target column. |
Status KuduPartialRow::SetSerial | +( | +const Slice & | +col_name, | +
+ | + | uint64_t | +val | +
+ | ) | ++ |
Set value for a column by name.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetSerial | +( | +int | +col_idx, | +
+ | + | uint64_t | +val | +
+ | ) | ++ |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetString | +( | +const Slice & | +col_name, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by name, copying the specified data immediately.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetString | +( | +int | +col_idx, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by index, copying the specified data immediately.
+These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
+[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetStringCopy | +( | +const Slice & | +col_name, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by name, copying the specified data immediately.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetStringCopy | +( | +int | +col_idx, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by index, copying the specified data immediately.
+These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
+[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetStringNoCopy | +( | +const Slice & | +col_name, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by name, not copying the specified data.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetStringNoCopy | +( | +int | +col_idx, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the binary/string value for a column by index, not copying the specified data.
+These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
+[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetUnixTimeMicros | +( | +const Slice & | +col_name, | +
+ | + | int64_t | +micros_since_utc_epoch | +
+ | ) | ++ |
Set value for a column by name.
+[in] | col_name | Name of the target column. |
[in] | micros_since_utc_epoch | The value to set. |
Status KuduPartialRow::SetUnixTimeMicros | +( | +int | +col_idx, | +
+ | + | int64_t | +micros_since_utc_epoch | +
+ | ) | ++ |
[in] | col_idx | The index of the target column. |
[in] | micros_since_utc_epoch | The value to set. |
Status KuduPartialRow::SetVarchar | +( | +const Slice & | +col_name, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the varchar value for a column by name, copying the specified data immediately.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetVarchar | +( | +int | +col_idx, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
Set the varchar value for a column by index, copying the specified data immediately.
+These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
+[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetVarcharNoCopyUnsafe | +( | +const Slice & | +col_name, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
This method expects the values to be truncated already and they only do a basic validation that the data is not larger than the maximum column length (as indicated by the schema) multiplied by 4, as that's the upper limit if only 4-byte UTF8 characters are used. This is subject to change in the future.
+[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetVarcharNoCopyUnsafe | +( | +int | +col_idx, | +
+ | + | const Slice & | +val | +
+ | ) | ++ |
This method expects the values to be truncated already and they only do a basic validation that the data is not larger than the maximum column length (as indicated by the schema) multiplied by 4, as that's the upper limit if only 4-byte UTF8 characters are used. This is subject to change in the future.
+This setter is the same as the corresponding column-name-based setter, but with numeric column indexes. This is faster since it avoids hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
+[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
std::string KuduPartialRow::ToEncodedRowKeyOrDie | +( | +) | +const | +
Convenience method which is similar to EncodeRowKey.
+This is equivalent to the EncodeRowKey, but triggers a FATAL error on failure.
+std::string KuduPartialRow::ToString | +( | +) | +const | +
Status KuduPartialRow::Unset | +( | +const Slice & | +col_name | ) | ++ |
Unset the given column by name, restoring its default value.
+NULL
.[in] | col_name | Name of the target column. |
Status KuduPartialRow::Unset | +( | +int | +col_idx | ) | ++ |
Unset the given column by index, restoring its default value.
+NULL
.[in] | col_idx | The index of the target column. |
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::MonoDelta, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A representation of a time interval. + More...
+ +#include <monotime.h>
+Public Member Functions | |
MonoDelta () | |
bool | Initialized () const |
bool | LessThan (const MonoDelta &rhs) const |
bool | MoreThan (const MonoDelta &rhs) const |
bool | Equals (const MonoDelta &rhs) const |
std::string | ToString () const |
void | ToTimeVal (struct timeval *tv) const |
void | ToTimeSpec (struct timespec *ts) const |
Converters into seconds representation (and ubiquitous SI prefixes). | |
double | ToSeconds () const |
int64_t | ToMilliseconds () const |
int64_t | ToMicroseconds () const |
int64_t | ToNanoseconds () const |
Syntactic sugar: increment/decrement operators for MonoDelta. | |
MonoDelta & | operator+= (const MonoDelta &delta) |
MonoDelta & | operator-= (const MonoDelta &delta) |
+Static Public Member Functions | |
static void | NanosToTimeSpec (int64_t nanos, struct timespec *ts) |
Converters from seconds representation (and ubiquitous SI prefixes). | |
static MonoDelta | FromSeconds (double seconds) |
static MonoDelta | FromMilliseconds (int64_t ms) |
static MonoDelta | FromMicroseconds (int64_t us) |
static MonoDelta | FromNanoseconds (int64_t ns) |
A representation of a time interval.
+The MonoDelta class represents an elapsed duration of time – i.e. the delta between two MonoTime instances.
+kudu::MonoDelta::MonoDelta | +( | +) | ++ |
bool kudu::MonoDelta::Equals | +( | +const MonoDelta & | +rhs | ) | +const | +
Check whether this time interval has the same duration as the specified one.
+[in] | rhs | A time interval for comparison. |
true
iff this time interval has the same duration as the the specified one.
+
|
+ +static | +
[in] | us | Time interval representation in seconds (with ubiquitous SI prefixes). |
+
|
+ +static | +
[in] | ms | Time interval representation in seconds (with ubiquitous SI prefixes). |
+
|
+ +static | +
[in] | ns | Time interval representation in seconds (with ubiquitous SI prefixes). |
+
|
+ +static | +
[in] | seconds | Time interval representation in seconds (with ubiquitous SI prefixes). |
bool kudu::MonoDelta::Initialized | +( | +) | +const | +
true
iff this object is initialized. bool kudu::MonoDelta::LessThan | +( | +const MonoDelta & | +rhs | ) | +const | +
Check whether this time interval is shorter than the specified one.
+[in] | rhs | A time interval for comparison. |
true
iff this time interval is strictly shorter than the specified one. bool kudu::MonoDelta::MoreThan | +( | +const MonoDelta & | +rhs | ) | +const | +
Check whether this time interval is longer than the specified one.
+[in] | rhs | A time interval for comparison. |
true
iff this time interval is strictly longer than the specified one.
+
|
+ +static | +
Convert a nanosecond value to a timespec.
+[in] | nanos | Representation of a relative point in time in nanoseconds. |
[out] | ts | Placeholder for the resulting timespec representation. |
Add a delta to current time interval.
+[in] | delta | The delta to add. |
Substract a delta from current time interval.
+[in] | delta | The delta to substract. |
int64_t kudu::MonoDelta::ToMicroseconds | +( | +) | +const | +
int64_t kudu::MonoDelta::ToMilliseconds | +( | +) | +const | +
int64_t kudu::MonoDelta::ToNanoseconds | +( | +) | +const | +
double kudu::MonoDelta::ToSeconds | +( | +) | +const | +
std::string kudu::MonoDelta::ToString | +( | +) | +const | +
void kudu::MonoDelta::ToTimeSpec | +( | +struct timespec * | +ts | ) | +const | +
Represent this time interval as a timespec structure, with nanosecond accuracy.
+[out] | ts | Placeholder for the result value. |
void kudu::MonoDelta::ToTimeVal | +( | +struct timeval * | +tv | ) | +const | +
Represent this time interval as a timeval structure, with microsecond accuracy.
+[out] | tv | Placeholder for the result value. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::MonoTime, including all inherited members.
+AddDelta(const MonoDelta &delta) | kudu::MonoTime | |
ComesBefore(const MonoTime &rhs) const | kudu::MonoTime | |
Earliest(const MonoTime &a, const MonoTime &b) | kudu::MonoTime | static |
Equals(const MonoTime &other) const | kudu::MonoTime | |
GetDeltaSince(const MonoTime &rhs) const | kudu::MonoTime | |
Initialized() const | kudu::MonoTime | |
kMicrosecondsPerSecond | kudu::MonoTime | static |
kNanosecondsPerMicrosecond | kudu::MonoTime | static |
kNanosecondsPerMillisecond | kudu::MonoTime | static |
kNanosecondsPerSecond | kudu::MonoTime | static |
Max() | kudu::MonoTime | static |
Min() | kudu::MonoTime | static |
MonoTime() KUDU_MONOTIME_NOEXCEPT | kudu::MonoTime | |
Now() | kudu::MonoTime | static |
operator+=(const MonoDelta &delta) | kudu::MonoTime | |
operator-(const MonoTime &, const MonoTime &) | kudu::MonoTime | friend |
operator-=(const MonoDelta &delta) | kudu::MonoTime | |
ToString() const | kudu::MonoTime | |
ToTimeSpec(struct timespec *ts) const | kudu::MonoTime |
+ Kudu C++ client API
+
+ |
+
Representation of a particular point in time. + More...
+ +#include <monotime.h>
+Public Member Functions | |
MonoTime () KUDU_MONOTIME_NOEXCEPT | |
bool | Initialized () const |
MonoDelta | GetDeltaSince (const MonoTime &rhs) const |
void | AddDelta (const MonoDelta &delta) |
bool | ComesBefore (const MonoTime &rhs) const |
std::string | ToString () const |
void | ToTimeSpec (struct timespec *ts) const |
bool | Equals (const MonoTime &other) const |
Syntactic sugar: increment/decrement operators for MonoTime. | |
MonoTime & | operator+= (const MonoDelta &delta) |
MonoTime & | operator-= (const MonoDelta &delta) |
+Static Public Member Functions | |
static MonoTime | Now () |
static MonoTime | Max () |
static MonoTime | Min () |
static const MonoTime & | Earliest (const MonoTime &a, const MonoTime &b) |
+Static Public Attributes | |
Conversion constants for ubiquitous time units. | |
+static const int64_t | kNanosecondsPerSecond = 1000000000L |
Nanoseconds per second. | |
+static const int64_t | kNanosecondsPerMillisecond = 1000000L |
Nanoseconds per millisecond. | |
+static const int64_t | kNanosecondsPerMicrosecond = 1000L |
Nanoseconds per microseconds. | |
+static const int64_t | kMicrosecondsPerSecond = 1000000L |
Microseconds per second. | |
Representation of a particular point in time.
+The MonoTime class represents a particular point in time, relative to some fixed but unspecified reference point.
+This time is monotonic, meaning that if the user changes his or her system clock, the monotime does not change.
+kudu::MonoTime::MonoTime | +( | +) | ++ |
Build a MonoTime object. The resulting object is not initialized and not ready to use.
+ +void kudu::MonoTime::AddDelta | +( | +const MonoDelta & | +delta | ) | ++ |
Advance this object's time specification by the specified interval.
+[in] | delta | The time interval to add. |
bool kudu::MonoTime::ComesBefore | +( | +const MonoTime & | +rhs | ) | +const | +
Check whether the point in time specified by this object is earlier than the specified one.
+[in] | rhs | The other MonoTime object to compare with. |
true
iff the point in time represented by this MonoTime object is earlier then the point in time represented by the parameter.
+
|
+ +static | +
Select the earliest between the specified time points.
+use
std::min() instead.[in] | a | The first MonoTime object to select from. |
[in] | b | The second MonoTime object to select from. |
bool kudu::MonoTime::Equals | +( | +const MonoTime & | +other | ) | +const | +
Compute time interval between the point in time specified by this and the specified object.
+kudu::operator-(const MonoTime&, const MonoTime&)
instead.[in] | rhs | The object that corresponds to the left boundary of the time interval, where this object corresponds to the right boundary of the interval. |
bool kudu::MonoTime::Initialized | +( | +) | +const | +
true
iff the object is initialized.
+
|
+ +static | +
+
|
+ +static | +
+
|
+ +static | +
Get current time in MonoTime representation.
+Add a delta to the point in time represented by the object.
+[in] | delta | The delta to add. |
Substract a delta from the point in time represented by the object.
+[in] | delta | The delta to substract. |
std::string kudu::MonoTime::ToString | +( | +) | +const | +
void kudu::MonoTime::ToTimeSpec | +( | +struct timespec * | +ts | ) | +const | +
Represent this point in time as a timespec structure, with nanosecond accuracy.
+[out] | ts | Placeholder for the result value. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::Slice, including all inherited members.
+check_size(size_t expected_size) const | kudu::Slice | |
clear() | kudu::Slice | inline |
compare(const Slice &b) const | kudu::Slice | inline |
data() const | kudu::Slice | inline |
empty() const | kudu::Slice | inline |
mutable_data() | kudu::Slice | inline |
operator==(const Slice &x, const Slice &y) | kudu::Slice | friend |
operator[](size_t n) const | kudu::Slice | inline |
relocate(uint8_t *d) | kudu::Slice | inline |
remove_prefix(size_t n) | kudu::Slice | inline |
size() const | kudu::Slice | inline |
Slice() | kudu::Slice | inline |
Slice(const uint8_t *d, size_t n) | kudu::Slice | inline |
Slice(const char *d, size_t n) | kudu::Slice | inline |
Slice(const std::string &s) | kudu::Slice | inline |
Slice(const char *s) | kudu::Slice | inline |
starts_with(const Slice &x) const | kudu::Slice | inline |
ToDebugString(size_t max_len=0) const | kudu::Slice | |
ToString() const | kudu::Slice | |
truncate(size_t n) | kudu::Slice | inline |
+ Kudu C++ client API
+
+ |
+
A wrapper around externally allocated data. + More...
+ +#include <slice.h>
+Classes | |
struct | Comparator |
Comparator struct, useful for ordered collections (like STL maps). More... | |
+Public Member Functions | |
+ | Slice () |
Create an empty slice. | |
Slice (const uint8_t *d, size_t n) | |
Slice (const char *d, size_t n) | |
Slice (const std::string &s) | |
Slice (const char *s) | |
const uint8_t * | data () const |
uint8_t * | mutable_data () |
size_t | size () const |
bool | empty () const |
const uint8_t & | operator[] (size_t n) const |
+void | clear () |
Change this slice to refer to an empty array. | |
void | remove_prefix (size_t n) |
void | truncate (size_t n) |
Status | check_size (size_t expected_size) const |
std::string | ToString () const |
std::string | ToDebugString (size_t max_len=0) const |
int | compare (const Slice &b) const |
bool | starts_with (const Slice &x) const |
void | relocate (uint8_t *d) |
A wrapper around externally allocated data.
+Slice is a simple structure containing a pointer into some external storage and a size. The user of a Slice must ensure that the slice is not used after the corresponding external storage has been deallocated.
+Multiple threads can invoke const methods on a Slice without external synchronization, but if any of the threads may call a non-const method, all threads accessing the same Slice must use external synchronization.
+Slices can be built around faststrings and StringPieces using constructors with implicit casts. Both StringPieces and faststrings depend on a great deal of gutil code.
+
+
|
+ +inline | +
Create a slice that refers to a uint8_t
byte array.
[in] | d | The input array. |
[in] | n | Number of bytes in the array. |
+
|
+ +inline | +
Create a slice that refers to a char
byte array.
[in] | d | The input array. |
[in] | n | Number of bytes in the array. |
+
|
+ +inline | +
Create a slice that refers to the contents of the given string.
+[in] | s | The input string. |
+
|
+ +inline | +
Create a slice that refers to a C-string s[0,strlen(s)-1].
+[in] | s | The input C-string. |
Status kudu::Slice::check_size | +( | +size_t | +expected_size | ) | +const | +
Check that the slice has the expected size.
+[in] | expected_size |
expected_size
+
|
+ +inline | +
Do a three-way comparison of the slice's data.
+[in] | b | The other slice to compare with. |
+
|
+ +inline | +
+
|
+ +inline | +
true
iff the length of the referenced data is zero.
+
|
+ +inline | +
+
|
+ +inline | +
[in] | n | The index of the byte. |
+
|
+ +inline | +
Relocate/copy the slice's data into a new location.
+[in] | d | The new location for the data. If it's the same location, then no relocation is done. It is assumed that the new location is large enough to fit the data. |
+
|
+ +inline | +
Drop the first "n" bytes from this slice.
+[in] | n | Number of bytes that should be dropped from the beginning. |
+
|
+ +inline | +
+
|
+ +inline | +
Check whether the slice starts with the given prefix.
[in] | x | The slice in question. |
true
iff "x" is a prefix of "*this" std::string kudu::Slice::ToDebugString | +( | +size_t | +max_len = 0 | ) | +const | +
Get printable representation of the data in the slice.
+[in] | max_len | The maximum number of bytes to output in the printable format; 0 means no limit. |
std::string kudu::Slice::ToString | +( | +) | +const | +
+
|
+ +inline | +
Truncate the slice to the given number of bytes.
+[in] | n | The new size of the slice. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::Status, including all inherited members.
+Aborted(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
AlreadyPresent(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
CloneAndAppend(const Slice &msg) const | kudu::Status | |
CloneAndPrepend(const Slice &msg) const | kudu::Status | |
CodeAsString() const | kudu::Status | |
ConfigurationError(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
Corruption(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
EndOfFile(const Slice &msg, const Slice &msg2=Slice(), int64_t posix_code=-1) | kudu::Status | inlinestatic |
IllegalState(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
Immutable(const Slice &msg, const Slice &msg2=Slice(), int64_t posix_code=-1) | kudu::Status | inlinestatic |
Incomplete(const Slice &msg, const Slice &msg2=Slice(), int64_t posix_code=-1) | kudu::Status | inlinestatic |
InvalidArgument(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
IOError(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
IsAborted() const | kudu::Status | inline |
IsAlreadyPresent() const | kudu::Status | inline |
IsConfigurationError() const | kudu::Status | inline |
IsCorruption() const | kudu::Status | inline |
IsDiskFailure() const | kudu::Status | inline |
IsEndOfFile() const | kudu::Status | inline |
IsIllegalState() const | kudu::Status | inline |
IsImmutable() const | kudu::Status | inline |
IsIncomplete() const | kudu::Status | inline |
IsInvalidArgument() const | kudu::Status | inline |
IsIOError() const | kudu::Status | inline |
IsNetworkError() const | kudu::Status | inline |
IsNotAuthorized() const | kudu::Status | inline |
IsNotFound() const | kudu::Status | inline |
IsNotSupported() const | kudu::Status | inline |
IsRemoteError() const | kudu::Status | inline |
IsRuntimeError() const | kudu::Status | inline |
IsServiceUnavailable() const | kudu::Status | inline |
IsTimedOut() const | kudu::Status | inline |
IsUninitialized() const | kudu::Status | inline |
memory_footprint_excluding_this() const | kudu::Status | |
memory_footprint_including_this() const | kudu::Status | |
message() const | kudu::Status | |
NetworkError(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
NotAuthorized(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
NotFound(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
NotSupported(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
ok() const | kudu::Status | inline |
OK() | kudu::Status | inlinestatic |
operator=(const Status &s) | kudu::Status | inline |
posix_code() const | kudu::Status | |
RemoteError(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
RuntimeError(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
ServiceUnavailable(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
Status() | kudu::Status | inline |
Status(const Status &s) | kudu::Status | inline |
TimedOut(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
ToString() const | kudu::Status | |
Uninitialized(const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) | kudu::Status | inlinestatic |
~Status() (defined in kudu::Status) | kudu::Status | inline |
+ Kudu C++ client API
+
+ |
+
A representation of an operation's outcome. + More...
+ +#include <status.h>
+Public Member Functions | |
+ | Status () |
Create an object representing success status. | |
Status (const Status &s) | |
Status & | operator= (const Status &s) |
bool | ok () const |
bool | IsNotFound () const |
bool | IsCorruption () const |
bool | IsNotSupported () const |
bool | IsIOError () const |
bool | IsInvalidArgument () const |
bool | IsAlreadyPresent () const |
bool | IsRuntimeError () const |
bool | IsNetworkError () const |
bool | IsIllegalState () const |
bool | IsNotAuthorized () const |
bool | IsAborted () const |
bool | IsRemoteError () const |
bool | IsServiceUnavailable () const |
bool | IsTimedOut () const |
bool | IsUninitialized () const |
bool | IsConfigurationError () const |
bool | IsIncomplete () const |
bool | IsEndOfFile () const |
bool | IsImmutable () const |
bool | IsDiskFailure () const |
std::string | ToString () const |
std::string | CodeAsString () const |
Slice | message () const |
int16_t | posix_code () const |
Status | CloneAndPrepend (const Slice &msg) const |
Status | CloneAndAppend (const Slice &msg) const |
size_t | memory_footprint_excluding_this () const |
size_t | memory_footprint_including_this () const |
+Static Public Member Functions | |
static Status | OK () |
Methods to build status objects for various types of errors. | |
static Status | NotFound (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | Corruption (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | NotSupported (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | InvalidArgument (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | IOError (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | AlreadyPresent (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | RuntimeError (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | NetworkError (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | IllegalState (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | NotAuthorized (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | Aborted (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | RemoteError (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | ServiceUnavailable (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | TimedOut (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | Uninitialized (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | ConfigurationError (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | Incomplete (const Slice &msg, const Slice &msg2=Slice(), int64_t posix_code=-1) |
static Status | EndOfFile (const Slice &msg, const Slice &msg2=Slice(), int64_t posix_code=-1) |
static Status | Immutable (const Slice &msg, const Slice &msg2=Slice(), int64_t posix_code=-1) |
A representation of an operation's outcome.
+
+
|
+ +inline | +
Copy the specified status.
+[in] | s | The status object to copy from. |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
Clone this status and add the specified suffix to the message.
+If this status is OK, then an OK status will be returned.
+[in] | msg | The message to append. |
Clone this status and add the specified prefix to the message.
+If this status is OK, then an OK status will be returned.
+[in] | msg | The message to prepend. |
std::string kudu::Status::CodeAsString | +( | +) | +const | +
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inline | +
true
iff the status indicates an Aborted error.
+
|
+ +inline | +
true
iff the status indicates an AlreadyPresent error.
+
|
+ +inline | +
true
iff the status indicates ConfigurationError.
+
|
+ +inline | +
true
iff the status indicates a Corruption error.
+
|
+ +inline | +
true
iff the status indicates a disk failure.
+
|
+ +inline | +
true
iff the status indicates end of file.
+
|
+ +inline | +
true
iff the status indicates an IllegalState error.
+
|
+ +inline | +
true
iff the status indicates immutable.
+
|
+ +inline | +
true
iff the status indicates Incomplete.
+
|
+ +inline | +
true
iff the status indicates an InvalidArgument error.
+
|
+ +inline | +
true
iff the status indicates an IOError.
+
|
+ +inline | +
true
iff the status indicates a NetworkError.
+
|
+ +inline | +
true
iff the status indicates a NotAuthorized error.
+
|
+ +inline | +
true
iff the status indicates a NotFound error.
+
|
+ +inline | +
true
iff the status indicates a NotSupported error.
+
|
+ +inline | +
true
iff the status indicates a RemoteError.
+
|
+ +inline | +
true
iff the status indicates a RuntimeError.
+
|
+ +inline | +
true
iff the status indicates ServiceUnavailable.
+
|
+ +inline | +
true
iff the status indicates TimedOut.
+
|
+ +inline | +
true
iff the status indicates Uninitialized. size_t kudu::Status::memory_footprint_excluding_this | +( | +) | +const | +
size_t kudu::Status::memory_footprint_including_this | +( | +) | +const | +
Slice kudu::Status::message | +( | +) | +const | +
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
+
|
+ +inline | +
true
iff the status indicates success. Assign the specified status.
+[in] | s | The status object to assign from. |
int16_t kudu::Status::posix_code | +( | +) | +const | +
-1
if there is none.
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
std::string kudu::Status::ToString | +( | +) | +const | +
+
|
+ +inlinestatic | +
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduBloomFilter, including all inherited members.
+Insert(const Slice &key) | kudu::client::KuduBloomFilter | |
~KuduBloomFilter() (defined in kudu::client::KuduBloomFilter) | kudu::client::KuduBloomFilter |
+ Kudu C++ client API
+
+ |
+
Bloom filter to be used with IN Bloom filter predicate. + More...
+ +#include <scan_predicate.h>
+Public Member Functions | |
void | Insert (const Slice &key) |
Bloom filter to be used with IN Bloom filter predicate.
+A Bloom filter is a space-efficient probabilistic data-structure used to test set membership with a possibility of false positive matches.
+Create a new KuduBloomFilter using KuduBloomFilterBuilder
class and populate column values that need to be scanned using KuduBloomFilter::Insert()
function.
Supply the populated KuduBloomFilter to KuduTable::NewInBloomFilterPredicate()
to create an IN Bloom filter predicate.
void kudu::client::KuduBloomFilter::Insert | +( | +const Slice & | +key | ) | ++ |
Insert key to the Bloom filter.
+[in] | key | Column value as a Slice to insert into the Bloom filter. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduBloomFilterBuilder, including all inherited members.
+Build(KuduBloomFilter **bloom_filter) | kudu::client::KuduBloomFilterBuilder | |
false_positive_probability(double fpp) | kudu::client::KuduBloomFilterBuilder | |
hash_algorithm(HashAlgorithm hash_algorithm) | kudu::client::KuduBloomFilterBuilder | |
hash_seed(uint32_t hash_seed) | kudu::client::KuduBloomFilterBuilder | |
KuduBloomFilterBuilder(size_t num_keys) | kudu::client::KuduBloomFilterBuilder | explicit |
~KuduBloomFilterBuilder() (defined in kudu::client::KuduBloomFilterBuilder) | kudu::client::KuduBloomFilterBuilder |
+ Kudu C++ client API
+
+ |
+
Builder class to help build KuduBloomFilter
to be used with IN Bloom filter predicate.
+ More...
#include <scan_predicate.h>
+Public Member Functions | |
KuduBloomFilterBuilder (size_t num_keys) | |
KuduBloomFilterBuilder & | false_positive_probability (double fpp) |
KuduBloomFilterBuilder & | hash_algorithm (HashAlgorithm hash_algorithm) |
KuduBloomFilterBuilder & | hash_seed (uint32_t hash_seed) |
Status | Build (KuduBloomFilter **bloom_filter) |
Builder class to help build KuduBloomFilter
to be used with IN Bloom filter predicate.
+
|
+ +explicit | +
[in] | num_keys | Expected number of elements to be inserted in the Bloom filter. |
Status kudu::client::KuduBloomFilterBuilder::Build | +( | +KuduBloomFilter ** | +bloom_filter | ) | ++ |
Build a new Bloom filter to be used with IN Bloom filter predicate.
+[out] | bloom_filter | On success, the created Bloom filter raw pointer. Caller owns the Bloom filter until it's passed to KuduTable::NewInBloomFilterPredicate() . |
bloom_filter
output parameter. On failure to allocate memory or invalid arguments, corresponding error status. KuduBloomFilterBuilder& kudu::client::KuduBloomFilterBuilder::false_positive_probability | +( | +double | +fpp | ) | ++ |
[in] | fpp | Desired false positive probability between 0.0 and 1.0. If not provided, defaults to 0.01. |
KuduBloomFilterBuilder& kudu::client::KuduBloomFilterBuilder::hash_algorithm | +( | +HashAlgorithm | +hash_algorithm | ) | ++ |
[in] | hash_algorithm | Hash algorithm used to hash keys before inserting to the Bloom filter. If not provided, defaults to FAST_HASH. |
KuduBloomFilterBuilder& kudu::client::KuduBloomFilterBuilder::hash_seed | +( | +uint32_t | +hash_seed | ) | ++ |
[in] | hash_seed | Seed used with hash algorithm to hash the keys before inserting to the Bloom filter. If not provided, defaults to 0. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduClient, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A handle for a connection to a cluster. + More...
+ +#include <client.h>
+Public Types | |
enum | ReplicaSelection { LEADER_ONLY +, CLOSEST_REPLICA +, FIRST_REPLICA + } |
Policy with which to choose amongst multiple replicas. More... | |
+Public Member Functions | |
KuduTableCreator * | NewTableCreator () |
Status | IsCreateTableInProgress (const std::string &table_name, bool *create_in_progress) |
Status | DeleteTable (const std::string &table_name) |
Status | SoftDeleteTable (const std::string &table_name, uint32_t reserve_seconds=0) |
KuduTableAlterer * | NewTableAlterer (const std::string &table_name) |
Status | IsAlterTableInProgress (const std::string &table_name, bool *alter_in_progress) |
Status | GetTableSchema (const std::string &table_name, KuduSchema *schema) |
Status | ListTabletServers (std::vector< KuduTabletServer * > *tablet_servers) |
Status | ListTables (std::vector< std::string > *tables, const std::string &filter="") |
Status | ListSoftDeletedTables (std::vector< std::string > *tables, const std::string &filter="") |
Status | TableExists (const std::string &table_name, bool *exists) |
Status | OpenTable (const std::string &table_name, sp::shared_ptr< KuduTable > *table) |
sp::shared_ptr< KuduSession > | NewSession () |
Status | NewTransaction (sp::shared_ptr< KuduTransaction > *txn) WARN_UNUSED_RESULT |
bool | IsMultiMaster () const |
const MonoDelta & | default_admin_operation_timeout () const |
const MonoDelta & | default_rpc_timeout () const |
MonoDelta | connection_negotiation_timeout () const |
uint64_t | GetLatestObservedTimestamp () const |
void | SetLatestObservedTimestamp (uint64_t ht_timestamp) |
Status | ExportAuthenticationCredentials (std::string *authn_creds) const |
+Static Public Attributes | |
static const uint64_t | kNoTimestamp |
A handle for a connection to a cluster.
+The KuduClient class represents a connection to a cluster. From the user perspective, they should only need to create one of these in their application, likely a singleton – but it is not a singleton in Kudu in any way. Different KuduClient objects do not interact with each other – no connection pooling, etc. With the exception of common properties managed by free (non-member) functions in the kudu::client namespace, each KuduClient object is sandboxed with no global cross-client state.
+In the implementation, the client holds various pieces of common infrastructure which is not table-specific:
In order to actually write data to the cluster, callers must first create a KuduSession object using NewSession(). A KuduClient may have several associated sessions.
+enum kudu::client::KuduClient::ReplicaSelection | +
Policy with which to choose amongst multiple replicas.
+MonoDelta kudu::client::KuduClient::connection_negotiation_timeout | +( | +) | +const | +
const MonoDelta& kudu::client::KuduClient::default_admin_operation_timeout | +( | +) | +const | +
const MonoDelta& kudu::client::KuduClient::default_rpc_timeout | +( | +) | +const | +
Status kudu::client::KuduClient::DeleteTable | +( | +const std::string & | +table_name | ) | ++ |
Delete/drop a table without reserving. The deleted table may turn to soft-deleted status with the flag –default_deleted_table_reserve_seconds set to nonzero on the master side.
+The delete operation or drop operation means that the service will directly delete the table after receiving the instruction. Which means that once we delete the table by mistake, we have no way to recall the deleted data. We have added a new SoftDeleteTable API to allow the deleted data to be reserved for a period of time, which means that the wrongly deleted data may be recalled. In order to be compatible with the previous versions, this interface will continue to directly delete tables without reserving the table.
+Refer to SoftDeleteTable for detailed usage examples.
+[in] | table_name | Name of the table to drop. |
Status kudu::client::KuduClient::ExportAuthenticationCredentials | +( | +std::string * | +authn_creds | ) | +const | +
Export the current authentication credentials from this client. This includes the necessary credentials to authenticate to the cluster, as well as to authenticate the cluster to the client.
+The resulting binary string may be passed into a new C++ client via the KuduClientBuilder::import_authentication_credentials
method, or into a new Java client via KuduClient::importAuthenticationCredentials
.
[out] | authn_creds | The resulting binary authentication credentials. |
uint64_t kudu::client::KuduClient::GetLatestObservedTimestamp | +( | +) | +const | +
Get the highest HybridTime timestamp observed by the client.
+This is useful when retrieving timestamp from one client and forwarding it to another to enforce external consistency when using KuduSession::CLIENT_PROPAGATED external consistency mode.
+Status kudu::client::KuduClient::GetTableSchema | +( | +const std::string & | +table_name, | +
+ | + | KuduSchema * | +schema | +
+ | ) | ++ |
Get table's schema.
+[in] | table_name | Name of the table. |
[out] | schema | Raw pointer to the schema object; caller gets ownership. |
Status kudu::client::KuduClient::IsAlterTableInProgress | +( | +const std::string & | +table_name, | +
+ | + | bool * | +alter_in_progress | +
+ | ) | ++ |
Check if table alteration is in-progress.
+[in] | table_name | Name of the table. |
[out] | alter_in_progress | The value is set only in case of success; it is true iff the operation is in progress. |
Status kudu::client::KuduClient::IsCreateTableInProgress | +( | +const std::string & | +table_name, | +
+ | + | bool * | +create_in_progress | +
+ | ) | ++ |
Check whether a create table operation is in-progress.
+[in] | table_name | Name of the table. |
[out] | create_in_progress | The value is set only in case of success; it is true iff the operation is in progress. |
bool kudu::client::KuduClient::IsMultiMaster | +( | +) | +const | +
true
iff client is configured to talk to multiple Kudu master servers. Status kudu::client::KuduClient::ListSoftDeletedTables | +( | +std::vector< std::string > * | +tables, | +
+ | + | const std::string & | +filter = "" |
+
+ | ) | ++ |
List soft-deleted tables only those names pass a substring with names matching the specified filter
.
[out] | tables | The placeholder for the result. Appended only on success. |
[in] | filter | Substring filter to use; empty sub-string filter matches all tables. |
Status kudu::client::KuduClient::ListTables | +( | +std::vector< std::string > * | +tables, | +
+ | + | const std::string & | +filter = "" |
+
+ | ) | ++ |
List non-soft-deleted tables whose names pass a substring match on filter
.
[out] | tables | The placeholder for the result. Appended only on success. |
[in] | filter | Substring filter to use; empty sub-string filter matches all tables. |
Status kudu::client::KuduClient::ListTabletServers | +( | +std::vector< KuduTabletServer * > * | +tablet_servers | ) | ++ |
Get information on current tablet servers.
+[out] | tablet_servers | The placeholder for the result. The caller takes ownership of the container's elements. |
sp::shared_ptr<KuduSession> kudu::client::KuduClient::NewSession | +( | +) | ++ |
Create a new session for interacting with the cluster.
+This is a fully local operation (no RPCs or blocking).
+KuduTableAlterer* kudu::client::KuduClient::NewTableAlterer | +( | +const std::string & | +table_name | ) | ++ |
Create a KuduTableAlterer object.
+[in] | table_name | Name of the table to alter. |
KuduTableCreator* kudu::client::KuduClient::NewTableCreator | +( | +) | ++ |
Create a KuduTableCreator object.
+Status kudu::client::KuduClient::NewTransaction | +( | +sp::shared_ptr< KuduTransaction > * | +txn | ) | ++ |
Start a multi-row transaction.
+This method results in an RPC sent to a Kudu cluster to begin a multi-row distributed transaction. In case of success, the resulting transaction handle is output into the 'txn' parameter. That handle can be used to create a new KuduSession
using the NewSession(const sp::shared_ptr<KuduSession>&)
method. To commit or rollback all single-row write operations performed in the context of the newly created transaction, use KuduTransaction::Commit()
and KuduTransaction::Rollback()
methods correspondingly.
KuduTransaction
should be kept in scope.txn | [out] The resulting KuduTransaction object wrapped into a smart pointer. This 'out' parameter is populated iff the operation to begin a transaction was successful. |
Status kudu::client::KuduClient::OpenTable | +( | +const std::string & | +table_name, | +
+ | + | sp::shared_ptr< KuduTable > * | +table | +
+ | ) | ++ |
Open table with the given name.
+This method does an RPC to ensure that the table exists and looks up its schema.
+[in] | table_name | Name of the table. |
[out] | table | The result table. |
Should we offer an async version of this as well?
+Probably should have a configurable timeout in KuduClientBuilder?
+void kudu::client::KuduClient::SetLatestObservedTimestamp | +( | +uint64_t | +ht_timestamp | ) | ++ |
Sets the latest observed HybridTime timestamp.
+This is only useful when forwarding timestamps between clients to enforce external consistency when using KuduSession::CLIENT_PROPAGATED external consistency mode.
+The HybridTime encoded timestamp should be obtained from another client's KuduClient::GetLatestObservedTimestamp() method.
+[in] | ht_timestamp | Timestamp encoded in HybridTime format. |
Status kudu::client::KuduClient::SoftDeleteTable | +( | +const std::string & | +table_name, | +
+ | + | uint32_t | +reserve_seconds = 0 |
+
+ | ) | ++ |
Soft delete/drop a table.
+Usage Example1: Equal to DeleteTable(table_name) and the table will not be reserved.
Usage Example2: The table will be reserved for 600s after delete operation. We can recall the table in time after the delete.
[in] | table_name | Name of the table to drop. |
[in] | reserve_seconds | Reserve seconds after being deleted. |
Status kudu::client::KuduClient::TableExists | +( | +const std::string & | +table_name, | +
+ | + | bool * | +exists | +
+ | ) | ++ |
Check if the table given by 'table_name' exists.
+[in] | table_name | Name of the table. |
[out] | exists | Set only on success; set to true iff table exists. |
+
|
+ +static | +
Value for the latest observed timestamp when none has been observed or set.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduClientBuilder, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A "factory" for KuduClient objects. + More...
+ +#include <client.h>
+Public Types | |
enum | EncryptionPolicy { OPTIONAL +, REQUIRED_REMOTE +, REQUIRED + } |
Policy for on-the-wire encryption. More... | |
A "factory" for KuduClient objects.
+This class is used to create instances of the KuduClient class with pre-set options/parameters.
+enum kudu::client::KuduClientBuilder::EncryptionPolicy | +
Policy for on-the-wire encryption.
+KuduClientBuilder& kudu::client::KuduClientBuilder::add_master_server_addr | +( | +const std::string & | +addr | ) | ++ |
Add an RPC address of a master to work with.
+At least one master is required.
+[in] | addr | RPC address of master server to add. |
Status kudu::client::KuduClientBuilder::Build | +( | +sp::shared_ptr< KuduClient > * | +client | ) | ++ |
Create a client object.
+[out] | client | The newly created object wrapped in a shared pointer. |
KuduClientBuilder& kudu::client::KuduClientBuilder::clear_master_server_addrs | +( | +) | ++ |
Clear the set of master addresses.
+KuduClientBuilder& kudu::client::KuduClientBuilder::connection_negotiation_timeout | +( | +const MonoDelta & | +timeout | ) | ++ |
Set the timeout for negotiating a connection to a remote server.
+If not provided, the underlying messenger is created with reasonable default. The result value could be retrieved using KuduClient.connection_negotiation_timeout()
after an instance of KuduClient
is created. Sometimes it makes sense to customize the timeout for connection negotiation, e.g. when running on a cluster with heavily loaded tablet servers. For details on the connection negotiation, see ../../../docs/design-docs/rpc.md::negotiation.
[in] | timeout | Timeout value to set. |
KuduClientBuilder& kudu::client::KuduClientBuilder::default_admin_operation_timeout | +( | +const MonoDelta & | +timeout | ) | ++ |
Set the default timeout for administrative operations.
+Using this method it is possible to modify the default timeout for operations like CreateTable, AlterTable, etc. By default it is 30 seconds.
+[in] | timeout | Timeout value to set. |
KuduClientBuilder& kudu::client::KuduClientBuilder::default_rpc_timeout | +( | +const MonoDelta & | +timeout | ) | ++ |
Set the default timeout for individual RPCs.
+If not provided, defaults to 10 seconds.
+[in] | timeout | Timeout value to set. |
KuduClientBuilder& kudu::client::KuduClientBuilder::encryption_policy | +( | +EncryptionPolicy | +encryption_policy | ) | ++ |
Require encryption for the connection to a remote server.
+If it's set to REQUIRED_REMOTE or REQUIRED, the client will require encrypting the traffic between the server and the client. If the server doesn't support encryption, or if it's disabled, the client will fail to connect.
+Loopback connections are encrypted only if 'encryption_policy' is set to REQUIRED, or if it's required by the server.
+The default value is OPTIONAL, which allows connecting to servers without encryption as well, but it will still attempt to use it if the server supports it.
+[in] | encryption_policy | Which encryption policy to use. |
KuduClientBuilder& kudu::client::KuduClientBuilder::import_authentication_credentials | +( | +std::string | +authn_creds | ) | ++ |
Import serialized authentication credentials from another client.
+import_authentication_credentials
and this method are called on the object, the JWT provided with this call overrides the corresponding JWT (if present) that comes as part of the imported authentication credentials.[in] | authn_creds | The serialized authentication credentials, provided by a call to KuduClient.ExportAuthenticationCredentials in the C++ client or KuduClient::exportAuthenticationCredentials in the Java client. |
KuduClientBuilder& kudu::client::KuduClientBuilder::jwt | +( | +const std::string & | +jwt | ) | ++ |
Set JWT (JSON Web Token) to authenticate the client to a server.
+import_authentication_credentials
and this method are called on the object, the JWT provided with this call overrides the corresponding JWT (if present) that comes as part of the imported authentication credentials.[in] | jwt | The JSON web token to set. |
KuduClientBuilder& kudu::client::KuduClientBuilder::master_server_addrs | +( | +const std::vector< std::string > & | +addrs | ) | ++ |
Add RPC addresses of multiple masters.
+[in] | addrs | RPC addresses of masters to add. |
KuduClientBuilder& kudu::client::KuduClientBuilder::num_reactors | +( | +int | +num_reactors | ) | ++ |
Set the number of reactors for the RPC messenger.
+The reactor threads are used for sending and receiving. If not provided, the underlying messenger is created with the default number of reactor threads.
+[in] | num_reactors | Number of reactors to set. |
KuduClientBuilder& kudu::client::KuduClientBuilder::require_authentication | +( | +bool | +require_authentication | ) | ++ |
Require authentication for the connection to a remote server.
+If it's set to true, the client will require mutual authentication between the server and the client. If the server doesn't support authentication, or it's disabled, the client will fail to connect.
+[in] | require_authentication | Whether to require authentication. |
KuduClientBuilder& kudu::client::KuduClientBuilder::sasl_protocol_name | +( | +const std::string & | +sasl_protocol_name | ) | ++ |
Set the SASL protocol name for the connection to a remote server.
+If the servers use a non-default Kerberos service principal name (other than "kudu" or "kudu/<hostname>", this needs to be set for the client to be able to connect to the servers. If unset, the client will assume the server is using the default service principal.
+[in] | sasl_protocol_name | SASL protocol name. |
KuduClientBuilder& kudu::client::KuduClientBuilder::trusted_certificate | +( | +const std::string & | +cert_pem | ) | ++ |
Add a trusted root CA certificate into the client's TLS certificate bundle.
+[in] | cert_pem | The trusted certificate to add, in PEM format. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduColumnSchema, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
Representation of the column schema. + More...
+ +#include <schema.h>
+Public Types | |
enum | DataType { + INT8 = 0 +, INT16 = 1 +, INT32 = 2 +, INT64 = 3 +, + STRING = 4 +, BOOL = 5 +, FLOAT = 6 +, DOUBLE = 7 +, + BINARY = 8 +, UNIXTIME_MICROS = 9 +, DECIMAL = 10 +, VARCHAR = 11 +, + TIMESTAMP = UNIXTIME_MICROS +, DATE = 12 +, SERIAL = 13 + + } |
Supported data types for columns. More... | |
+Public Member Functions | |
KuduColumnSchema (const KuduColumnSchema &other) | |
KuduColumnSchema & | operator= (const KuduColumnSchema &other) |
void | CopyFrom (const KuduColumnSchema &other) |
bool | Equals (const KuduColumnSchema &other) const |
bool | operator== (const KuduColumnSchema &rhs) const |
bool | operator!= (const KuduColumnSchema &rhs) const |
KuduColumnTypeAttributes | type_attributes () const |
KuduColumnStorageAttributes | storage_attributes () const |
const std::string & | comment () const |
Getters to expose column schema information. | |
| |
const std::string & | name () const |
DataType | type () const |
bool | is_nullable () const |
bool | is_immutable () const |
+Static Public Member Functions | |
static std::string | DataTypeToString (DataType type) |
static Status | StringToDataType (const std::string &type_str, DataType *type) |
Representation of the column schema.
+enum kudu::client::KuduColumnSchema::DataType | +
kudu::client::KuduColumnSchema::KuduColumnSchema | +( | +const KuduColumnSchema & | +other | ) | ++ |
Construct KuduColumnSchema object as a copy of another object.
+[in] | other | The reference object to copy from. |
const std::string& kudu::client::KuduColumnSchema::comment | +( | +) | +const | +
void kudu::client::KuduColumnSchema::CopyFrom | +( | +const KuduColumnSchema & | +other | ) | ++ |
Make this object an identical copy of the other one.
+[in] | other | The reference object to copy from. |
+
|
+ +static | +
[in] | type | Column data type. |
bool kudu::client::KuduColumnSchema::Equals | +( | +const KuduColumnSchema & | +other | ) | +const | +
Check whether the object is identical to the other one.
+[in] | other | The reference object to compare with. |
true
iff the object is identical to the specified one. bool kudu::client::KuduColumnSchema::is_immutable | +( | +) | +const | +
true
iff the column schema has the immutable attribute set. bool kudu::client::KuduColumnSchema::is_nullable | +( | +) | +const | +
true
iff the column schema has the nullable attribute set. const std::string& kudu::client::KuduColumnSchema::name | +( | +) | +const | +
bool kudu::client::KuduColumnSchema::operator!= | +( | +const KuduColumnSchema & | +rhs | ) | +const | +
Check whether the schema is not identical to the other one.
+[in] | rhs | KuduColumnSchema object to compare this one with. |
true
iff this KuduColumnSchema object is not identical to the specified one. KuduColumnSchema& kudu::client::KuduColumnSchema::operator= | +( | +const KuduColumnSchema & | +other | ) | ++ |
The assignment operator.
+[in] | other | The reference object to assign from. |
bool kudu::client::KuduColumnSchema::operator== | +( | +const KuduColumnSchema & | +rhs | ) | +const | +
Check whether the schema is identical to the other one.
+[in] | rhs | KuduColumnSchema object to compare this one with. |
true
iff this KuduColumnSchema object is identical to the specified one. KuduColumnStorageAttributes kudu::client::KuduColumnSchema::storage_attributes | +( | +) | +const | +
+
|
+ +static | +
[in] | type_str | String representation of the column data type |
[out] | type | Enum representation of the column data type, Converted from string format. |
DataType kudu::client::KuduColumnSchema::type | +( | +) | +const | +
KuduColumnTypeAttributes kudu::client::KuduColumnSchema::type_attributes | +( | +) | +const | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduColumnSpec, including all inherited members.
+BlockSize(int32_t block_size) | kudu::client::KuduColumnSpec | |
Comment(const std::string &comment) | kudu::client::KuduColumnSpec | |
Compression(KuduColumnStorageAttributes::CompressionType compression) | kudu::client::KuduColumnSpec | |
Default(KuduValue *value) | kudu::client::KuduColumnSpec | |
Encoding(KuduColumnStorageAttributes::EncodingType encoding) | kudu::client::KuduColumnSpec | |
Immutable() | kudu::client::KuduColumnSpec | |
Length(uint16_t length) | kudu::client::KuduColumnSpec | |
Mutable() | kudu::client::KuduColumnSpec | |
NonUniquePrimaryKey() | kudu::client::KuduColumnSpec | |
NotNull() | kudu::client::KuduColumnSpec | |
Nullable() | kudu::client::KuduColumnSpec | |
Precision(int8_t precision) | kudu::client::KuduColumnSpec | |
PrimaryKey() | kudu::client::KuduColumnSpec | |
RemoveDefault() | kudu::client::KuduColumnSpec | |
RenameTo(const std::string &new_name) | kudu::client::KuduColumnSpec | |
Scale(int8_t scale) | kudu::client::KuduColumnSpec | |
Type(KuduColumnSchema::DataType type) | kudu::client::KuduColumnSpec |
+ Kudu C++ client API
+
+ |
+
Builder API for specifying or altering a column within a table schema. + More...
+ +#include <schema.h>
+Public Member Functions | |
KuduColumnSpec * | Default (KuduValue *value) |
KuduColumnSpec * | Compression (KuduColumnStorageAttributes::CompressionType compression) |
KuduColumnSpec * | Encoding (KuduColumnStorageAttributes::EncodingType encoding) |
KuduColumnSpec * | BlockSize (int32_t block_size) |
KuduColumnSpec * | Comment (const std::string &comment) |
Operations only relevant for decimal columns. | |
KuduColumnSpec * | Precision (int8_t precision) |
KuduColumnSpec * | Scale (int8_t scale) |
Operation only relevant for VARCHAR columns. | |
KuduColumnSpec * | Length (uint16_t length) |
Operations only relevant for Create Table | |
KuduColumnSpec * | PrimaryKey () |
KuduColumnSpec * | NonUniquePrimaryKey () |
KuduColumnSpec * | NotNull () |
KuduColumnSpec * | Nullable () |
KuduColumnSpec * | Immutable () |
KuduColumnSpec * | Mutable () |
KuduColumnSpec * | Type (KuduColumnSchema::DataType type) |
Operations only relevant for Alter Table | |
KuduColumnSpec * | RemoveDefault () |
KuduColumnSpec * | RenameTo (const std::string &new_name) |
Builder API for specifying or altering a column within a table schema.
+An object of this type cannot be constructed directly, but rather is returned from KuduSchemaBuilder::AddColumn() to specify a column within a Schema.
+KuduColumnSpec* kudu::client::KuduColumnSpec::BlockSize | +( | +int32_t | +block_size | ) | ++ |
Set the target block size for the column.
+This is the number of bytes of user data packed per block on disk, and represents the unit of IO when reading the column. Larger values may improve scan performance, particularly on spinning media. Smaller values may improve random access performance, particularly for workloads that have high cache hit rates or operate on fast storage such as SSD.
+[in] | block_size | Block size (in bytes) to use. |
KuduColumnSpec* kudu::client::KuduColumnSpec::Comment | +( | +const std::string & | +comment | ) | ++ |
Set the comment of the column.
+[in] | comment | The comment for the column. |
KuduColumnSpec* kudu::client::KuduColumnSpec::Compression | +( | +KuduColumnStorageAttributes::CompressionType | +compression | ) | ++ |
Set the preferred compression type for the column.
+[in] | compression | The compression type to use. |
KuduColumnSpec* kudu::client::KuduColumnSpec::Default | +( | +KuduValue * | +value | ) | ++ |
Set the default value for the column.
+When adding a new column to a table, this default value will be used to fill the new column in all existing rows. The default value will also be used when inserting a new row with no value for the column.
+[in] | value | The value to use as the default. The KuduColumnSpec takes ownership over the passed parameter. |
KuduColumnSpec* kudu::client::KuduColumnSpec::Encoding | +( | +KuduColumnStorageAttributes::EncodingType | +encoding | ) | ++ |
Set the preferred encoding for the column.
+[in] | encoding | The encoding to use. |
KuduColumnSpec* kudu::client::KuduColumnSpec::Immutable | +( | +) | ++ |
Set the column to be immutable.
+KuduColumnSpec* kudu::client::KuduColumnSpec::Length | +( | +uint16_t | +length | ) | ++ |
Set the length for a column.
+Clients can specify a length for VARCHAR columns. Length represents the maximum length of a VARCHAR column in characters.
+The length must be greater than 0 and less than 65536. If no length is provided a default length of 65535 is used.
+[in] | length | Desired length to set. |
KuduColumnSpec* kudu::client::KuduColumnSpec::Mutable | +( | +) | ++ |
Set the column to be mutable (the default).
+KuduColumnSpec* kudu::client::KuduColumnSpec::NonUniquePrimaryKey | +( | +) | ++ |
Set the column to be a non-unique primary key of the table.
+This may only be used to set non-composite non-unique primary keys. If a composite key is desired, use KuduSchemaBuilder::SetNonUniquePrimaryKey(). This may not be used in conjunction with KuduSchemaBuilder::SetNonUniquePrimaryKey().
+KuduColumnSpec* kudu::client::KuduColumnSpec::NotNull | +( | +) | ++ |
Set the column to be not nullable.
+KuduColumnSpec* kudu::client::KuduColumnSpec::Nullable | +( | +) | ++ |
Set the column to be nullable (the default).
+KuduColumnSpec* kudu::client::KuduColumnSpec::Precision | +( | +int8_t | +precision | ) | ++ |
Set the precision for the column.
+Clients must specify a precision for decimal columns. Precision is the total number of digits that can be represented by the column, regardless of the location of the decimal point. For example, representing integer values up to 9999, and fractional values up to 99.99, both require a precision of 4. You can also represent corresponding negative values, without any change in the precision. For example, the range -9999 to 9999 still only requires a precision of 4.
+The precision must be between 1 and 38.
+[in] | precision | Desired precision to set. |
KuduColumnSpec* kudu::client::KuduColumnSpec::PrimaryKey | +( | +) | ++ |
Set the column to be the primary key of the table.
+This may only be used to set non-composite primary keys. If a composite key is desired, use KuduSchemaBuilder::SetPrimaryKey(). This may not be used in conjunction with KuduSchemaBuilder::SetPrimaryKey().
+KuduColumnSpec* kudu::client::KuduColumnSpec::RemoveDefault | +( | +) | ++ |
Remove the default value for the column.
+Without a default, clients must always specify a value for the column when inserting data.
+KuduColumnSpec* kudu::client::KuduColumnSpec::RenameTo | +( | +const std::string & | +new_name | ) | ++ |
Rename the column.
+[in] | new_name | The new name for the column. |
KuduColumnSpec* kudu::client::KuduColumnSpec::Scale | +( | +int8_t | +scale | ) | ++ |
Set the scale for the column.
+Clients can specify a scale for decimal columns. Scale represents the number of fractional digits. This value must be less than or equal to precision. A scale of 0 produces integral values, with no fractional part. If precision and scale are equal, all the digits come after the decimal point, making all the values between 0.9999 and -0.9999.
+The scale must be greater than 0 and less than the column's precision. If no scale is provided a default scale of 0 is used.
+[in] | scale | Desired scale to set. |
KuduColumnSpec* kudu::client::KuduColumnSpec::Type | +( | +KuduColumnSchema::DataType | +type | ) | ++ |
Set the data type of the column.
+[in] | type | The data type to set. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduColumnStorageAttributes, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
Representation of column storage attributes. + More...
+ +#include <schema.h>
+Public Types | |
enum | EncodingType { + AUTO_ENCODING = 0 +, PLAIN_ENCODING = 1 +, PREFIX_ENCODING = 2 +, RLE = 4 +, + DICT_ENCODING = 5 +, BIT_SHUFFLE = 6 +, GROUP_VARINT = 3 + + } |
Column encoding types. More... | |
enum | CompressionType { + DEFAULT_COMPRESSION = 0 +, NO_COMPRESSION = 1 +, SNAPPY = 2 +, LZ4 = 3 +, + ZLIB = 4 + + } |
Column compression types. | |
+Public Member Functions | |
KuduColumnStorageAttributes (EncodingType encoding=AUTO_ENCODING, CompressionType compression=DEFAULT_COMPRESSION, int32_t block_size=0) | |
const EncodingType | encoding () const |
const CompressionType | compression () const |
std::string | ToString () const |
+Static Public Member Functions | |
static Status | StringToEncodingType (const std::string &encoding, EncodingType *type) |
static Status | StringToCompressionType (const std::string &compression, CompressionType *type) |
Representation of column storage attributes.
+enum kudu::client::KuduColumnStorageAttributes::EncodingType | +
Column encoding types.
+Enumerator | |
---|---|
GROUP_VARINT |
|
+
|
+ +inlineexplicit | +
[in] | encoding | Encoding type for the column storage. |
[in] | compression | Compression type for the column storage. |
[in] | block_size | Block size (in bytes, uncompressed data) for the column storage. |
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +static | +
[in] | compression | String representation of the column compression type |
[out] | type | Enum representation of the column compression type, Converted from string format. |
+
|
+ +static | +
[in] | encoding | String representation of the column encoding type |
[out] | type | Enum representation of the column encoding type, Converted from string format. |
std::string kudu::client::KuduColumnStorageAttributes::ToString | +( | +) | +const | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduColumnTypeAttributes, including all inherited members.
+CopyFrom(const KuduColumnTypeAttributes &other) | kudu::client::KuduColumnTypeAttributes | |
KuduColumnTypeAttributes() (defined in kudu::client::KuduColumnTypeAttributes) | kudu::client::KuduColumnTypeAttributes | |
KuduColumnTypeAttributes(const KuduColumnTypeAttributes &other) | kudu::client::KuduColumnTypeAttributes | |
KuduColumnTypeAttributes(int8_t precision, int8_t scale) | kudu::client::KuduColumnTypeAttributes | |
KuduColumnTypeAttributes(uint16_t length) | kudu::client::KuduColumnTypeAttributes | explicit |
length() const | kudu::client::KuduColumnTypeAttributes | |
operator=(const KuduColumnTypeAttributes &other) | kudu::client::KuduColumnTypeAttributes | |
precision() const | kudu::client::KuduColumnTypeAttributes | |
scale() const | kudu::client::KuduColumnTypeAttributes | |
~KuduColumnTypeAttributes() (defined in kudu::client::KuduColumnTypeAttributes) | kudu::client::KuduColumnTypeAttributes |
+ Kudu C++ client API
+
+ |
+
Representation of column type attributes. + More...
+ +#include <schema.h>
+Public Member Functions | |
KuduColumnTypeAttributes (const KuduColumnTypeAttributes &other) | |
KuduColumnTypeAttributes (int8_t precision, int8_t scale) | |
KuduColumnTypeAttributes (uint16_t length) | |
int8_t | precision () const |
int8_t | scale () const |
uint16_t | length () const |
Assign/copy KuduColumnTypeAttributes. | |
KuduColumnTypeAttributes & | operator= (const KuduColumnTypeAttributes &other) |
void | CopyFrom (const KuduColumnTypeAttributes &other) |
Representation of column type attributes.
+kudu::client::KuduColumnTypeAttributes::KuduColumnTypeAttributes | +( | +const KuduColumnTypeAttributes & | +other | ) | ++ |
Create a KuduColumnTypeAttributes object as a copy of the other one.
+[in] | other | The other KuduColumnTypeAttributes object to use as a reference. |
kudu::client::KuduColumnTypeAttributes::KuduColumnTypeAttributes | +( | +int8_t | +precision, | +
+ | + | int8_t | +scale | +
+ | ) | ++ |
Create a KuduColumnTypeAttributes object
+[in] | precision | The precision of a decimal column. |
[in] | scale | The scale of a decimal column. |
+
|
+ +explicit | +
Create a KuduColumnTypeAttributes object
+[in] | length | The maximum length of a VARCHAR column in characters. |
void kudu::client::KuduColumnTypeAttributes::CopyFrom | +( | +const KuduColumnTypeAttributes & | +other | ) | ++ |
[in] | other | The source KuduColumnTypeAttributes object to use as a reference. |
uint16_t kudu::client::KuduColumnTypeAttributes::length | +( | +) | +const | +
KuduColumnTypeAttributes& kudu::client::KuduColumnTypeAttributes::operator= | +( | +const KuduColumnTypeAttributes & | +other | ) | ++ |
[in] | other | The source KuduColumnTypeAttributes object to use as a reference. |
int8_t kudu::client::KuduColumnTypeAttributes::precision | +( | +) | +const | +
int8_t kudu::client::KuduColumnTypeAttributes::scale | +( | +) | +const | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduColumnarScanBatch, including all inherited members.
+GetFixedLengthColumn(int idx, Slice *data) const | kudu::client::KuduColumnarScanBatch | |
GetNonNullBitmapForColumn(int idx, Slice *data) const | kudu::client::KuduColumnarScanBatch | |
GetVariableLengthColumn(int idx, Slice *offsets, Slice *data) const | kudu::client::KuduColumnarScanBatch | |
KuduColumnarScanBatch() (defined in kudu::client::KuduColumnarScanBatch) | kudu::client::KuduColumnarScanBatch | |
NumRows() const | kudu::client::KuduColumnarScanBatch | |
~KuduColumnarScanBatch() (defined in kudu::client::KuduColumnarScanBatch) | kudu::client::KuduColumnarScanBatch |
+ Kudu C++ client API
+
+ |
+
A batch of columnar data returned from a scanner. + More...
+ +#include <columnar_scan_batch.h>
+Public Member Functions | |
int | NumRows () const |
Status | GetFixedLengthColumn (int idx, Slice *data) const |
Status | GetVariableLengthColumn (int idx, Slice *offsets, Slice *data) const |
Status | GetNonNullBitmapForColumn (int idx, Slice *data) const |
A batch of columnar data returned from a scanner.
+Similar to KuduScanBatch, this contains a batch of rows returned from a scanner. This type of batch is used if the KuduScanner::COLUMNAR_LAYOUT row format flag is enabled.
+Retrieving rows in columnar layout can be significantly more efficient. It saves some CPU cycles on the Kudu cluster and can also enable faster processing of the returned data in certain client applications.
+The columnar data retrieved by this class matches the columnar encoding described by Apache Arrow[1], but without the alignment and padding guarantees that are made by the Arrow IPC serialization.
+[1] https://arrow.apache.org/docs/format/Columnar.html
+NOTE: this class is not thread-safe.
+Status kudu::client::KuduColumnarScanBatch::GetFixedLengthColumn | +( | +int | +idx, | +
+ | + | Slice * | +data | +
+ | ) | +const | +
Get the raw columnar data corresponding to the primitive-typed column with index 'idx'.
+For variable-length (e.g. STRING, BINARY, VARCHAR) columns, use GetVariableLengthColumn instead.
+[in] | idx | The column index. |
[out] | data | The data is in little-endian packed array format. No alignment or padding is guaranteed. Space is reserved for all cells regardless of whether they might be null. The data stored in a null cell may or may not be zeroed. |
Status kudu::client::KuduColumnarScanBatch::GetNonNullBitmapForColumn | +( | +int | +idx, | +
+ | + | Slice * | +data | +
+ | ) | +const | +
Get a bitmap corresponding to the non-null status of the cells in the given column.
+It is an error to call this function on a column which is not marked as nullable in the schema.
+[in] | idx | The column index. |
[out] | data | The bitmap corresponding to the non-null status of the cells in the given column. A set bit indicates a non-null cell. If the number of rows is not a multiple of 8, the state of the trailing bits in the bitmap is undefined. |
Status kudu::client::KuduColumnarScanBatch::GetVariableLengthColumn | +( | +int | +idx, | +
+ | + | Slice * | +offsets, | +
+ | + | Slice * | +data | +
+ | ) | +const | +
Return the variable-length data for the variable-length-typed column with index 'idx'.
+[in] | idx | The column index. |
[out] | offsets | If NumRows() is 0, the 'offsets' array will have length 0. Otherwise, this array will contain NumRows() + 1 entries, each indicating an offset within the variable-length data array returned in 'data'. For each cell with index 'n', offsets[n] indicates the starting offset of that cell, and offsets[n+1] indicates the ending offset of that cell. |
[out] | data | The variable-length data. |
int kudu::client::KuduColumnarScanBatch::NumRows | +( | +) | +const | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduDelete, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A single row delete to be sent to the cluster. + More...
+ +#include <write_op.h>
+Public Member Functions | |
virtual std::string | ToString () const OVERRIDE |
Public Member Functions inherited from kudu::client::KuduWriteOperation | |
const KuduPartialRow & | row () const |
KuduPartialRow * | mutable_row () |
const KuduTable * | table () const |
+Additional Inherited Members | |
Public Types inherited from kudu::client::KuduWriteOperation | |
enum | Type { + INSERT = 1 +, UPDATE = 2 +, DELETE = 3 +, UPSERT = 4 +, + INSERT_IGNORE = 5 +, UPDATE_IGNORE = 6 +, DELETE_IGNORE = 7 +, UPSERT_IGNORE = 8 + + } |
Write operation types. | |
A single row delete to be sent to the cluster.
+
+
|
+ +inlinevirtual | +
Implements kudu::client::KuduWriteOperation.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduDeleteIgnore, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A single row delete ignore to be sent to the cluster. + More...
+ +#include <write_op.h>
+Public Member Functions | |
virtual std::string | ToString () const OVERRIDE |
Public Member Functions inherited from kudu::client::KuduWriteOperation | |
const KuduPartialRow & | row () const |
KuduPartialRow * | mutable_row () |
const KuduTable * | table () const |
+Additional Inherited Members | |
Public Types inherited from kudu::client::KuduWriteOperation | |
enum | Type { + INSERT = 1 +, UPDATE = 2 +, DELETE = 3 +, UPSERT = 4 +, + INSERT_IGNORE = 5 +, UPDATE_IGNORE = 6 +, DELETE_IGNORE = 7 +, UPSERT_IGNORE = 8 + + } |
Write operation types. | |
A single row delete ignore to be sent to the cluster.
+
+
|
+ +inlinevirtual | +
Implements kudu::client::KuduWriteOperation.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduError, including all inherited members.
+failed_op() const | kudu::client::KuduError | |
release_failed_op() | kudu::client::KuduError | |
status() const | kudu::client::KuduError | |
was_possibly_successful() const | kudu::client::KuduError | |
~KuduError() (defined in kudu::client::KuduError) | kudu::client::KuduError |
+ Kudu C++ client API
+
+ |
+
This class represents an error which occurred in a write operation. + More...
+ +#include <client.h>
+Public Member Functions | |
const Status & | status () const |
const KuduWriteOperation & | failed_op () const |
KuduWriteOperation * | release_failed_op () |
bool | was_possibly_successful () const |
This class represents an error which occurred in a write operation.
+Using an instance of this class, it is possible to track error details such as the operation which caused the error, along with whatever the actual error was.
+const KuduWriteOperation& kudu::client::KuduError::failed_op | +( | +) | +const | +
KuduWriteOperation* kudu::client::KuduError::release_failed_op | +( | +) | ++ |
Release the operation that failed.
+This method must be called only once on an instance of the KuduError class.
+const Status& kudu::client::KuduError::status | +( | +) | +const | +
bool kudu::client::KuduError::was_possibly_successful | +( | +) | +const | +
Check if there is a chance that the requested operation was successful.
+In some cases, it is possible that the server did receive and successfully perform the requested operation, but the client can't tell whether or not it was successful. For example, if the call times out, the server may still succeed in processing at a later time.
+true
if there is some chance that the server did process the operation, and false
if it can guarantee that the operation did not succeed.
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduInsert, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A single row insert to be sent to the cluster. + More...
+ +#include <write_op.h>
+Public Member Functions | |
virtual std::string | ToString () const OVERRIDE |
Public Member Functions inherited from kudu::client::KuduWriteOperation | |
const KuduPartialRow & | row () const |
KuduPartialRow * | mutable_row () |
const KuduTable * | table () const |
+Additional Inherited Members | |
Public Types inherited from kudu::client::KuduWriteOperation | |
enum | Type { + INSERT = 1 +, UPDATE = 2 +, DELETE = 3 +, UPSERT = 4 +, + INSERT_IGNORE = 5 +, UPDATE_IGNORE = 6 +, DELETE_IGNORE = 7 +, UPSERT_IGNORE = 8 + + } |
Write operation types. | |
A single row insert to be sent to the cluster.
+
+
|
+ +inlinevirtual | +
Implements kudu::client::KuduWriteOperation.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduInsertIgnore, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A single row insert ignore to be sent to the cluster, duplicate row errors are ignored. + More...
+ +#include <write_op.h>
+Public Member Functions | |
virtual std::string | ToString () const OVERRIDE |
Public Member Functions inherited from kudu::client::KuduWriteOperation | |
const KuduPartialRow & | row () const |
KuduPartialRow * | mutable_row () |
const KuduTable * | table () const |
+Additional Inherited Members | |
Public Types inherited from kudu::client::KuduWriteOperation | |
enum | Type { + INSERT = 1 +, UPDATE = 2 +, DELETE = 3 +, UPSERT = 4 +, + INSERT_IGNORE = 5 +, UPDATE_IGNORE = 6 +, DELETE_IGNORE = 7 +, UPSERT_IGNORE = 8 + + } |
Write operation types. | |
A single row insert ignore to be sent to the cluster, duplicate row errors are ignored.
+
+
|
+ +inlinevirtual | +
Implements kudu::client::KuduWriteOperation.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduLoggingCallback, including all inherited members.
+KuduLoggingCallback() (defined in kudu::client::KuduLoggingCallback) | kudu::client::KuduLoggingCallback | inline |
Run(KuduLogSeverity severity, const char *filename, int line_number, const struct ::tm *time, const char *message, size_t message_len)=0 | kudu::client::KuduLoggingCallback | pure virtual |
~KuduLoggingCallback() (defined in kudu::client::KuduLoggingCallback) | kudu::client::KuduLoggingCallback | inlinevirtual |
+ Kudu C++ client API
+
+ |
+
The interface for all logging callbacks. + More...
+ +#include <callbacks.h>
+Public Member Functions | |
virtual void | Run (KuduLogSeverity severity, const char *filename, int line_number, const struct ::tm *time, const char *message, size_t message_len)=0 |
The interface for all logging callbacks.
+
+
|
+ +pure virtual | +
Log the message.
+message
is NOT terminated with an endline.[in] | severity | Severity of the log message. |
[in] | filename | The name of the source file the message is originated from. |
[in] | line_number | The line of the source file the message is originated from. |
[in] | time | The absolute time when the log event was generated. |
[in] | message | The message to log. It's not terminated with an endline. |
[in] | message_len | Number of characters in the message . |
Implemented in kudu::client::KuduLoggingFunctionCallback< T >, and kudu::client::KuduLoggingMemberCallback< T >.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduLoggingFunctionCallback< T >, including all inherited members.
+FunctionType typedef | kudu::client::KuduLoggingFunctionCallback< T > | |
KuduLoggingCallback() (defined in kudu::client::KuduLoggingCallback) | kudu::client::KuduLoggingCallback | inline |
KuduLoggingFunctionCallback(FunctionType function, T arg) | kudu::client::KuduLoggingFunctionCallback< T > | inline |
Run(KuduLogSeverity severity, const char *filename, int line_number, const struct ::tm *time, const char *message, size_t message_len) OVERRIDE | kudu::client::KuduLoggingFunctionCallback< T > | inlinevirtual |
~KuduLoggingCallback() (defined in kudu::client::KuduLoggingCallback) | kudu::client::KuduLoggingCallback | inlinevirtual |
+ Kudu C++ client API
+
+ |
+
The logging callback that invokes a function by pointer with a single argument. + More...
+ +#include <callbacks.h>
+Public Types | |
+typedef void(* | FunctionType) (T arg, KuduLogSeverity severity, const char *filename, int line_number, const struct ::tm *time, const char *message, size_t message_len) |
A handy typedef for the function with appropriate signature. | |
+Public Member Functions | |
KuduLoggingFunctionCallback (FunctionType function, T arg) | |
virtual void | Run (KuduLogSeverity severity, const char *filename, int line_number, const struct ::tm *time, const char *message, size_t message_len) OVERRIDE |
The logging callback that invokes a function by pointer with a single argument.
+
+
|
+ +inline | +
Build an instance of KuduLoggingFunctionCallback.
+[in] | function | A pointer to the logging function to invoke with the arg argument. |
[in] | arg | An argument for the function invocation. |
+
|
+ +inlinevirtual | +
Log the message.
+message
is NOT terminated with an endline.[in] | severity | Severity of the log message. |
[in] | filename | The name of the source file the message is originated from. |
[in] | line_number | The line of the source file the message is originated from. |
[in] | time | The absolute time when the log event was generated. |
[in] | message | The message to log. It's not terminated with an endline. |
[in] | message_len | Number of characters in the message . |
Implements kudu::client::KuduLoggingCallback.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduLoggingMemberCallback< T >, including all inherited members.
+KuduLoggingCallback() (defined in kudu::client::KuduLoggingCallback) | kudu::client::KuduLoggingCallback | inline |
KuduLoggingMemberCallback(T *object, MemberType member) | kudu::client::KuduLoggingMemberCallback< T > | inline |
MemberType typedef | kudu::client::KuduLoggingMemberCallback< T > | |
Run(KuduLogSeverity severity, const char *filename, int line_number, const struct ::tm *time, const char *message, size_t message_len) OVERRIDE | kudu::client::KuduLoggingMemberCallback< T > | inlinevirtual |
~KuduLoggingCallback() (defined in kudu::client::KuduLoggingCallback) | kudu::client::KuduLoggingCallback | inlinevirtual |
+ Kudu C++ client API
+
+ |
+
The logging callback that invokes a member function of an object. + More...
+ +#include <callbacks.h>
+Public Types | |
+typedef void(T::* | MemberType) (KuduLogSeverity severity, const char *filename, int line_number, const struct ::tm *time, const char *message, size_t message_len) |
A handy typedef for the member function with appropriate signature. | |
+Public Member Functions | |
KuduLoggingMemberCallback (T *object, MemberType member) | |
virtual void | Run (KuduLogSeverity severity, const char *filename, int line_number, const struct ::tm *time, const char *message, size_t message_len) OVERRIDE |
The logging callback that invokes a member function of an object.
+
+
|
+ +inline | +
Build an instance of KuduLoggingMemberCallback.
+[in] | object | A pointer to the object. |
[in] | member | A pointer to the member function of the object to invoke. |
+
|
+ +inlinevirtual | +
Log the message.
+message
is NOT terminated with an endline.[in] | severity | Severity of the log message. |
[in] | filename | The name of the source file the message is originated from. |
[in] | line_number | The line of the source file the message is originated from. |
[in] | time | The absolute time when the log event was generated. |
[in] | message | The message to log. It's not terminated with an endline. |
[in] | message_len | Number of characters in the message . |
Implements kudu::client::KuduLoggingCallback.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduPartitioner, including all inherited members.
+NumPartitions() const | kudu::client::KuduPartitioner | |
PartitionRow(const KuduPartialRow &row, int *partition) | kudu::client::KuduPartitioner | |
~KuduPartitioner() (defined in kudu::client::KuduPartitioner) | kudu::client::KuduPartitioner |
+ Kudu C++ client API
+
+ |
+
#include <client.h>
+Public Member Functions | |
int | NumPartitions () const |
Status | PartitionRow (const KuduPartialRow &row, int *partition) |
A KuduPartitioner allows clients to determine the target partition of a row without actually performing a write. The set of partitions is eagerly fetched when the KuduPartitioner is constructed so that the actual partitioning step can be performed synchronously without any network trips.
+int kudu::client::KuduPartitioner::NumPartitions | +( | +) | +const | +
PartitionRow
are guaranteed to be less than this value. Status kudu::client::KuduPartitioner::PartitionRow | +( | +const KuduPartialRow & | +row, | +
+ | + | int * | +partition | +
+ | ) | ++ |
Determine the partition index that the given row falls into.
+[in] | row | The row to be partitioned. |
[out] | partition | The resulting partition index, or -1 if the row falls into a non-covered range. The result will be less than NumPartitions() . |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduPartitionerBuilder, including all inherited members.
+Build(KuduPartitioner **partitioner) | kudu::client::KuduPartitionerBuilder | |
KuduPartitionerBuilder(sp::shared_ptr< KuduTable > table) | kudu::client::KuduPartitionerBuilder | explicit |
SetBuildTimeout(MonoDelta timeout) | kudu::client::KuduPartitionerBuilder | |
~KuduPartitionerBuilder() (defined in kudu::client::KuduPartitionerBuilder) | kudu::client::KuduPartitionerBuilder |
+ Kudu C++ client API
+
+ |
+
Builder for Partitioner instances. + More...
+ +#include <client.h>
+Public Member Functions | |
KuduPartitionerBuilder (sp::shared_ptr< KuduTable > table) | |
KuduPartitionerBuilder * | SetBuildTimeout (MonoDelta timeout) |
Status | Build (KuduPartitioner **partitioner) |
Builder for Partitioner instances.
+
+
|
+ +explicit | +
Construct an instance of the class.
+[in] | table | The table whose rows should be partitioned. |
Status kudu::client::KuduPartitionerBuilder::Build | +( | +KuduPartitioner ** | +partitioner | ) | ++ |
Create a KuduPartitioner object for the specified table.
+This fetches all of the partitioning information up front if it is not already cached by the associated KuduClient object. Thus, it may time out or have an error if the Kudu master is not accessible.
+[out] | partitioner | The resulting KuduPartitioner instance; caller gets ownership. |
KuduPartitionerBuilder* kudu::client::KuduPartitionerBuilder::SetBuildTimeout | +( | +MonoDelta | +timeout | ) | ++ |
Set the timeout used for building the Partitioner object.
+[in] | timeout | The timeout to set. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduPredicate, including all inherited members.
+Clone() const | kudu::client::KuduPredicate | |
ComparisonOp enum name | kudu::client::KuduPredicate | |
Data | kudu::client::KuduPredicate | |
EQUAL enum value (defined in kudu::client::KuduPredicate) | kudu::client::KuduPredicate | |
GREATER enum value (defined in kudu::client::KuduPredicate) | kudu::client::KuduPredicate | |
GREATER_EQUAL enum value (defined in kudu::client::KuduPredicate) | kudu::client::KuduPredicate | |
LESS enum value (defined in kudu::client::KuduPredicate) | kudu::client::KuduPredicate | |
LESS_EQUAL enum value (defined in kudu::client::KuduPredicate) | kudu::client::KuduPredicate | |
~KuduPredicate() (defined in kudu::client::KuduPredicate) | kudu::client::KuduPredicate |
+ Kudu C++ client API
+
+ |
+
A representation of comparison predicate for Kudu queries. + More...
+ +#include <scan_predicate.h>
+Public Types | |
enum | ComparisonOp { + LESS_EQUAL +, GREATER_EQUAL +, EQUAL +, LESS +, + GREATER + + } |
Supported comparison operators. | |
+Public Member Functions | |
KuduPredicate * | Clone () const |
+Public Attributes | |
class KUDU_NO_EXPORT | Data |
Forward declaration for the embedded PIMPL class. More... | |
A representation of comparison predicate for Kudu queries.
+Call KuduTable::NewComparisonPredicate() to create a predicate object.
+KuduPredicate* kudu::client::KuduPredicate::Clone | +( | +) | +const | +
class KUDU_NO_EXPORT kudu::client::KuduPredicate::Data | +
Forward declaration for the embedded PIMPL class.
+The PIMPL class has to be public since it's actually just an interface, and gcc gives an error trying to derive from a private nested class.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduRangePartition, including all inherited members.
+add_hash_partitions(const std::vector< std::string > &columns, int32_t num_buckets, int32_t seed=0) | kudu::client::KuduRangePartition | |
KuduRangePartition(KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND) | kudu::client::KuduRangePartition | |
~KuduRangePartition() (defined in kudu::client::KuduRangePartition) | kudu::client::KuduRangePartition |
+ Kudu C++ client API
+
+ |
+
#include <client.h>
+Public Member Functions | |
KuduRangePartition (KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND) | |
Status | add_hash_partitions (const std::vector< std::string > &columns, int32_t num_buckets, int32_t seed=0) |
A helper class to represent a Kudu range partition with a custom hash bucket schema. The hash sub-partitioning for a range partition might be different from the default table-wide hash bucket schema specified during the creation of a table (see KuduTableCreator::add_hash_partitions()). Correspondingly, this class provides a means to specify a custom hash bucket structure for the data in a range partition.
+kudu::client::KuduRangePartition::KuduRangePartition | +( | +KuduPartialRow * | +lower_bound, | +
+ | + | KuduPartialRow * | +upper_bound, | +
+ | + | KuduTableCreator::RangePartitionBound | +lower_bound_type = KuduTableCreator::INCLUSIVE_BOUND , |
+
+ | + | KuduTableCreator::RangePartitionBound | +upper_bound_type = KuduTableCreator::EXCLUSIVE_BOUND |
+
+ | ) | ++ |
Create an object representing the range defined by the given parameters.
+[in] | lower_bound | The lower bound for the range. The KuduRangePartition object takes ownership of the parameter. |
[in] | upper_bound | The upper bound for the range. The KuduRangePartition object takes ownership of the parameter. |
[in] | lower_bound_type | The type of the lower_bound: inclusive or exclusive; inclusive if the parameter is omitted. |
[in] | upper_bound_type | The type of the upper_bound: inclusive or exclusive; exclusive if the parameter is omitted. |
Status kudu::client::KuduRangePartition::add_hash_partitions | +( | +const std::vector< std::string > & | +columns, | +
+ | + | int32_t | +num_buckets, | +
+ | + | int32_t | +seed = 0 |
+
+ | ) | ++ |
Add a level of hash sub-partitioning for this range partition.
+The hash schema for the range partition is defined by the whole set of its hash sub-partitioning levels. A range partition can have multiple levels of hash sub-partitioning: this method can be called multiple times to define a multi-dimensional hash bucketing structure for the range. Alternatively, a range partition can have zero levels of hash sub-partitioning: simply don't call this method on a newly created KuduRangePartition
object to have no hash sub-partitioning for the range represented by the object.
[in] | columns | Names of columns to use for partitioning. |
[in] | num_buckets | Number of buckets for the hashing. |
[in] | seed | Hash seed for mapping rows to hash buckets. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduReplica, including all inherited members.
+is_leader() const | kudu::client::KuduReplica | |
ts() const | kudu::client::KuduReplica | |
~KuduReplica() (defined in kudu::client::KuduReplica) | kudu::client::KuduReplica |
+ Kudu C++ client API
+
+ |
+
In-memory representation of a remote tablet's replica. + More...
+ +#include <client.h>
+Public Member Functions | |
bool | is_leader () const |
const KuduTabletServer & | ts () const |
In-memory representation of a remote tablet's replica.
+bool kudu::client::KuduReplica::is_leader | +( | +) | +const | +
const KuduTabletServer& kudu::client::KuduReplica::ts | +( | +) | +const | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduScanBatch, including all inherited members.
+begin() const | kudu::client::KuduScanBatch | inline |
cell(int col_idx) const | kudu::client::KuduScanBatch | |
direct_data() const | kudu::client::KuduScanBatch | |
end() const | kudu::client::KuduScanBatch | inline |
GetBinary(const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetBinary(int col_idx, Slice *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetBool(const Slice &col_name, bool *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetBool(int col_idx, bool *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetDate(const Slice &col_name, int32_t *days_since_unix_epoch) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetDate(int col_idx, int32_t *days_since_unix_epoch) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetDouble(const Slice &col_name, double *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetDouble(int col_idx, double *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetFloat(const Slice &col_name, float *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetFloat(int col_idx, float *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetInt16(const Slice &col_name, int16_t *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetInt16(int col_idx, int16_t *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetInt32(const Slice &col_name, int32_t *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetInt32(int col_idx, int32_t *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetInt64(const Slice &col_name, int64_t *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetInt64(int col_idx, int64_t *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetInt8(const Slice &col_name, int8_t *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetInt8(int col_idx, int8_t *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetString(const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetString(int col_idx, Slice *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetUnixTimeMicros(const Slice &col_name, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetUnixTimeMicros(int col_idx, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetVarchar(const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
GetVarchar(int col_idx, Slice *val) const WARN_UNUSED_RESULT | kudu::client::KuduScanBatch | |
indirect_data() const | kudu::client::KuduScanBatch | |
IsDeleted(bool *val) const WARN_UNUSED_RESULT KUDU_NO_EXPORT | kudu::client::KuduScanBatch | |
IsNull(const Slice &col_name) const | kudu::client::KuduScanBatch | |
IsNull(int col_idx) const | kudu::client::KuduScanBatch | |
KuduScanBatch() (defined in kudu::client::KuduScanBatch) | kudu::client::KuduScanBatch | |
NumRows() const | kudu::client::KuduScanBatch | |
operator!=(const const_iterator &other) const | kudu::client::KuduScanBatch | inline |
operator*() const | kudu::client::KuduScanBatch | inline |
operator++() | kudu::client::KuduScanBatch | inline |
operator++(int) | kudu::client::KuduScanBatch | inline |
operator->() const | kudu::client::KuduScanBatch | inline |
operator->() const | kudu::client::KuduScanBatch | inline |
operator==(const const_iterator &other) const | kudu::client::KuduScanBatch | inline |
projection_schema() const | kudu::client::KuduScanBatch | |
Row(int idx) const | kudu::client::KuduScanBatch | |
RowPtr() | kudu::client::KuduScanBatch | inline |
ToString() const | kudu::client::KuduScanBatch | |
value_type typedef | kudu::client::KuduScanBatch | |
~const_iterator() (defined in kudu::client::KuduScanBatch) | kudu::client::KuduScanBatch | inline |
~KuduScanBatch() (defined in kudu::client::KuduScanBatch) | kudu::client::KuduScanBatch |
+ Kudu C++ client API
+
+ |
+
A batch of zero or more rows returned by a scan operation. + More...
+ +#include <scan_batch.h>
+Public Types | |
+typedef RowPtr | value_type |
A handy typedef for the RowPtr. | |
+Public Member Functions | |
int | NumRows () const |
KuduScanBatch::RowPtr | Row (int idx) const |
const_iterator | begin () const |
const_iterator | end () const |
const KuduSchema * | projection_schema () const |
RowPtr () | |
const RowPtr * | operator-> () const |
bool | IsNull (const Slice &col_name) const |
bool | IsNull (int col_idx) const |
Status | IsDeleted (bool *val) const WARN_UNUSED_RESULT KUDU_NO_EXPORT |
const void * | cell (int col_idx) const |
std::string | ToString () const |
KuduScanBatch::RowPtr | operator* () const |
KuduScanBatch::RowPtr | operator-> () const |
const_iterator & | operator++ () |
const_iterator | operator++ (int) |
bool | operator== (const const_iterator &other) const |
bool | operator!= (const const_iterator &other) const |
Advanced/Unstable API | |
There are no guarantees on the stability of the format returned by these methods, which might change at any given time. +
| |
Slice | direct_data () const |
Slice | indirect_data () const |
Getters for integral type columns by column name. | |
Status | GetBool (const Slice &col_name, bool *val) const WARN_UNUSED_RESULT |
Status | GetInt8 (const Slice &col_name, int8_t *val) const WARN_UNUSED_RESULT |
Status | GetInt16 (const Slice &col_name, int16_t *val) const WARN_UNUSED_RESULT |
Status | GetInt32 (const Slice &col_name, int32_t *val) const WARN_UNUSED_RESULT |
Status | GetInt64 (const Slice &col_name, int64_t *val) const WARN_UNUSED_RESULT |
Status | GetUnixTimeMicros (const Slice &col_name, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT |
Status | GetDate (const Slice &col_name, int32_t *days_since_unix_epoch) const WARN_UNUSED_RESULT |
Status | GetFloat (const Slice &col_name, float *val) const WARN_UNUSED_RESULT |
Status | GetDouble (const Slice &col_name, double *val) const WARN_UNUSED_RESULT |
Getters for integral type columns by column index. | |
These methods are faster than their name-based counterparts since using indices avoids a hashmap lookup, so index-based getters should be preferred in performance-sensitive code. + | |
Status | GetBool (int col_idx, bool *val) const WARN_UNUSED_RESULT |
Status | GetInt8 (int col_idx, int8_t *val) const WARN_UNUSED_RESULT |
Status | GetInt16 (int col_idx, int16_t *val) const WARN_UNUSED_RESULT |
Status | GetInt32 (int col_idx, int32_t *val) const WARN_UNUSED_RESULT |
Status | GetInt64 (int col_idx, int64_t *val) const WARN_UNUSED_RESULT |
Status | GetUnixTimeMicros (int col_idx, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT |
Status | GetDate (int col_idx, int32_t *days_since_unix_epoch) const WARN_UNUSED_RESULT |
Status | GetFloat (int col_idx, float *val) const WARN_UNUSED_RESULT |
Status | GetDouble (int col_idx, double *val) const WARN_UNUSED_RESULT |
Getters for string/binary/varchar column by column name. | |
Status | GetString (const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT |
Status | GetBinary (const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT |
Status | GetVarchar (const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT |
Getters for string/binary/varchar column by column index. | |
Status | GetString (int col_idx, Slice *val) const WARN_UNUSED_RESULT |
Status | GetBinary (int col_idx, Slice *val) const WARN_UNUSED_RESULT |
Status | GetVarchar (int col_idx, Slice *val) const WARN_UNUSED_RESULT |
A batch of zero or more rows returned by a scan operation.
+Every call to KuduScanner::NextBatch() returns a batch of zero or more rows. You can iterate over the rows in the batch using:
+range-foreach loop (C++11):
regular for loop (C++03):
or
+
|
+ +inline | +
const void* kudu::client::KuduScanBatch::cell | +( | +int | +col_idx | ) | +const | +
Get the column's row data.
+[in] | col_idx | The index of the column. |
Slice kudu::client::KuduScanBatch::direct_data | +( | +) | +const | +
Return a slice that points to the direct row data received from the server. Users of this API must have knowledge of the data format in order to decode the data.
+
+
|
+ +inline | +
Status kudu::client::KuduScanBatch::GetBinary | +( | +const Slice & | +col_name, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its name.
+[in] | col_name | Name of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetBinary | +( | +int | +col_idx, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its index.
+These methods are faster than their name-based counterparts since using indices avoids a hashmap lookup, so index-based getters should be preferred in performance-sensitive code.
+[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetBool | +( | +const Slice & | +col_name, | +
+ | + | bool * | +val | +
+ | ) | +const | +
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetBool | +( | +int | +col_idx, | +
+ | + | bool * | +val | +
+ | ) | +const | +
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetDate | +( | +const Slice & | +col_name, | +
+ | + | int32_t * | +days_since_unix_epoch | +
+ | ) | +const | +
[in] | col_name | The name of the target column. |
[out] | days_since_unix_epoch | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetDate | +( | +int | +col_idx, | +
+ | + | int32_t * | +days_since_unix_epoch | +
+ | ) | +const | +
[in] | col_idx | The index of the column. |
[out] | days_since_unix_epoch | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetDouble | +( | +const Slice & | +col_name, | +
+ | + | double * | +val | +
+ | ) | +const | +
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetDouble | +( | +int | +col_idx, | +
+ | + | double * | +val | +
+ | ) | +const | +
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetFloat | +( | +const Slice & | +col_name, | +
+ | + | float * | +val | +
+ | ) | +const | +
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetFloat | +( | +int | +col_idx, | +
+ | + | float * | +val | +
+ | ) | +const | +
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetInt16 | +( | +const Slice & | +col_name, | +
+ | + | int16_t * | +val | +
+ | ) | +const | +
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetInt16 | +( | +int | +col_idx, | +
+ | + | int16_t * | +val | +
+ | ) | +const | +
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetInt32 | +( | +const Slice & | +col_name, | +
+ | + | int32_t * | +val | +
+ | ) | +const | +
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetInt32 | +( | +int | +col_idx, | +
+ | + | int32_t * | +val | +
+ | ) | +const | +
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetInt64 | +( | +const Slice & | +col_name, | +
+ | + | int64_t * | +val | +
+ | ) | +const | +
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetInt64 | +( | +int | +col_idx, | +
+ | + | int64_t * | +val | +
+ | ) | +const | +
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetInt8 | +( | +const Slice & | +col_name, | +
+ | + | int8_t * | +val | +
+ | ) | +const | +
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetInt8 | +( | +int | +col_idx, | +
+ | + | int8_t * | +val | +
+ | ) | +const | +
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetString | +( | +const Slice & | +col_name, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its name.
+[in] | col_name | Name of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetString | +( | +int | +col_idx, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its index.
+These methods are faster than their name-based counterparts since using indices avoids a hashmap lookup, so index-based getters should be preferred in performance-sensitive code.
+[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetUnixTimeMicros | +( | +const Slice & | +col_name, | +
+ | + | int64_t * | +micros_since_utc_epoch | +
+ | ) | +const | +
[in] | col_name | The name of the target column. |
[out] | micros_since_utc_epoch | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetUnixTimeMicros | +( | +int | +col_idx, | +
+ | + | int64_t * | +micros_since_utc_epoch | +
+ | ) | +const | +
[in] | col_idx | The index of the column. |
[out] | micros_since_utc_epoch | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetVarchar | +( | +const Slice & | +col_name, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its name.
+[in] | col_name | Name of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status kudu::client::KuduScanBatch::GetVarchar | +( | +int | +col_idx, | +
+ | + | Slice * | +val | +
+ | ) | +const | +
Get the string/binary/varchar value for a column by its index.
+These methods are faster than their name-based counterparts since using indices avoids a hashmap lookup, so index-based getters should be preferred in performance-sensitive code.
+[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Slice kudu::client::KuduScanBatch::indirect_data | +( | +) | +const | +
Like the method above, but for indirect data.
+Status kudu::client::KuduScanBatch::IsDeleted | +( | +bool * | +val | ) | +const | +
Get the value of the IS_DELETED virtual column.
+[out] | val | Placeholder for the result value. |
bool kudu::client::KuduScanBatch::IsNull | +( | +const Slice & | +col_name | ) | +const | +
[in] | col_name | Name of the column. |
true
iff the specified column of the row has NULL
value. bool kudu::client::KuduScanBatch::IsNull | +( | +int | +col_idx | ) | +const | +
[in] | col_idx | Index of the column. |
true
iff the specified column of the row has NULL
value. int kudu::client::KuduScanBatch::NumRows | +( | +) | +const | +
+
|
+ +inline | +
An operator to check whether two iterators are 'not equal'.
+[in] | other | The iterator to compare with. |
true
iff the other iterator points to a different row in the same batch, or to a row belonging to a different batch altogether.
+
|
+ +inline | +
+
|
+ +inline | +
Prefix increment operator: advances the iterator to the next position.
+
+
|
+ +inline | +
Postfix increment operator: advances the iterator to the next position.
+
+
|
+ +inline | +
Overloaded operator -> to support pointer trait for access via const_iterator.
+
|
+ +inline | +
+
|
+ +inline | +
An operator to check whether two iterators are 'equal'.
+[in] | other | The iterator to compare with. |
true
iff the other iterator points to the same row of the same batch. const KuduSchema* kudu::client::KuduScanBatch::projection_schema | +( | +) | +const | +
KuduScanBatch::RowPtr kudu::client::KuduScanBatch::Row | +( | +int | +idx | ) | +const | +
Get a row at the specified index.
+[in] | idx | The index of the row to return. |
+
|
+ +inline | +
Construct an invalid RowPtr. Before use, you must assign a properly-initialized value.
+ +std::string kudu::client::KuduScanBatch::ToString | +( | +) | +const | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduScanToken, including all inherited members.
+DeserializeIntoScanner(KuduClient *client, const std::string &serialized_token, KuduScanner **scanner) WARN_UNUSED_RESULT | kudu::client::KuduScanToken | static |
IntoKuduScanner(KuduScanner **scanner) const WARN_UNUSED_RESULT | kudu::client::KuduScanToken | |
Serialize(std::string *buf) const WARN_UNUSED_RESULT | kudu::client::KuduScanToken | |
tablet() const | kudu::client::KuduScanToken | |
~KuduScanToken() (defined in kudu::client::KuduScanToken) | kudu::client::KuduScanToken |
+ Kudu C++ client API
+
+ |
+
A scan descriptor limited to a single physical contiguous location. + More...
+ +#include <client.h>
+Public Member Functions | |
Status | IntoKuduScanner (KuduScanner **scanner) const WARN_UNUSED_RESULT |
const KuduTablet & | tablet () const |
Status | Serialize (std::string *buf) const WARN_UNUSED_RESULT |
+Static Public Member Functions | |
static Status | DeserializeIntoScanner (KuduClient *client, const std::string &serialized_token, KuduScanner **scanner) WARN_UNUSED_RESULT |
A scan descriptor limited to a single physical contiguous location.
+A KuduScanToken describes a partial scan of a Kudu table limited to a single contiguous physical location. Using the KuduScanTokenBuilder, clients can describe the desired scan, including predicates, bounds, timestamps, and caching, and receive back a collection of scan tokens.
+Each scan token may be separately turned into a scanner using KuduScanToken::IntoKuduScanner, with each scanner responsible for a disjoint section of the table.
+Scan tokens may be serialized using the KuduScanToken::Serialize method and deserialized back into a scanner using the KuduScanToken::DeserializeIntoScanner method. This allows use cases such as generating scan tokens in the planner component of a query engine, then sending the tokens to execution nodes based on locality, and then instantiating the scanners on those nodes.
+Scan token locality information can be inspected using the KuduScanToken::tablet() function.
+
+
|
+ +static | +
Create a new scanner and set the scanner options.
+[in] | client | Client to bound to the scanner. |
[in] | serialized_token | Token containing serialized scanner parameters. |
[out] | scanner | The result scanner. The caller owns the new scanner. The scanner must be opened before use. The scanner will not be set if the returned status is an error. |
Status kudu::client::KuduScanToken::IntoKuduScanner | +( | +KuduScanner ** | +scanner | ) | +const | +
Create a new scanner.
+This method creates a new scanner, setting the result scanner's options according to the scan token.
+[out] | scanner | The result scanner. The caller owns the new scanner. The scanner must be opened before use. The output parameter will not be set if the returned status is an error. |
Status kudu::client::KuduScanToken::Serialize | +( | +std::string * | +buf | ) | +const | +
Serialize the token into a string.
+The resulting string can be deserialized with KuduScanToken::Deserialize()
to
[out] | buf | Result string to output the serialized token. |
const KuduTablet& kudu::client::KuduScanToken::tablet | +( | +) | +const | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduScanTokenBuilder, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
Builds scan tokens for a table. + More...
+ +#include <client.h>
+Public Member Functions | |
KuduScanTokenBuilder (KuduTable *table) | |
Status | SetProjectedColumnNames (const std::vector< std::string > &col_names) WARN_UNUSED_RESULT |
Status | SetProjectedColumnIndexes (const std::vector< int > &col_indexes) WARN_UNUSED_RESULT |
Status | AddConjunctPredicate (KuduPredicate *pred) WARN_UNUSED_RESULT |
Status | AddLowerBound (const KuduPartialRow &key) WARN_UNUSED_RESULT |
Status | AddUpperBound (const KuduPartialRow &key) WARN_UNUSED_RESULT |
Status | SetCacheBlocks (bool cache_blocks) WARN_UNUSED_RESULT |
Status | SetBatchSizeBytes (uint32_t batch_size) WARN_UNUSED_RESULT |
Status | SetSelection (KuduClient::ReplicaSelection selection) WARN_UNUSED_RESULT |
Status | SetReadMode (KuduScanner::ReadMode read_mode) WARN_UNUSED_RESULT |
Status | SetFaultTolerant () WARN_UNUSED_RESULT |
Status | SetSnapshotMicros (uint64_t snapshot_timestamp_micros) WARN_UNUSED_RESULT |
Status | SetSnapshotRaw (uint64_t snapshot_timestamp) WARN_UNUSED_RESULT |
Status | SetTimeoutMillis (int millis) WARN_UNUSED_RESULT |
Status | IncludeTableMetadata (bool include_metadata) WARN_UNUSED_RESULT |
Status | IncludeTabletMetadata (bool include_metadata) WARN_UNUSED_RESULT |
void | SetSplitSizeBytes (uint64_t split_size_bytes) |
Status | Build (std::vector< KuduScanToken * > *tokens) WARN_UNUSED_RESULT |
Builds scan tokens for a table.
+
+
|
+ +explicit | +
Construct an instance of the class.
+[in] | table | The table the tokens should scan. The given object must remain valid for the lifetime of the builder, and the tokens which it builds. |
Status kudu::client::KuduScanTokenBuilder::AddConjunctPredicate | +( | +KuduPredicate * | +pred | ) | ++ |
Add a predicate for the scan.
+[in] | pred | Predicate to set. The KuduScanTokenBuilder instance takes ownership of the parameter even if a bad Status is returned. Multiple calls of this method make the specified set of predicates work in conjunction, i.e. all predicates must be true for a row to be returned. |
Status kudu::client::KuduScanTokenBuilder::AddLowerBound | +( | +const KuduPartialRow & | +key | ) | ++ |
Add a lower bound (inclusive) primary key for the scan.
+If any bound is already added, this bound is intersected with that one.
+[in] | key | Lower bound primary key to add. The KuduScanTokenBuilder instance does not take ownership of the parameter. |
Status kudu::client::KuduScanTokenBuilder::AddUpperBound | +( | +const KuduPartialRow & | +key | ) | ++ |
Add an upper bound (exclusive) primary key.
+If any bound is already added, this bound is intersected with that one.
+[in] | key | Upper bound primary key to add. The KuduScanTokenBuilder instance does not take ownership of the parameter. |
Status kudu::client::KuduScanTokenBuilder::Build | +( | +std::vector< KuduScanToken * > * | +tokens | ) | ++ |
Build the set of scan tokens.
+The builder may be reused after this call.
+[out] | tokens | Result set of tokens. The caller takes ownership of the container elements. |
Status kudu::client::KuduScanTokenBuilder::IncludeTableMetadata | +( | +bool | +include_metadata | ) | ++ |
If the table metadata is included on the scan token a GetTableSchema RPC call to the master can be avoided when deserializing each scan token into a scanner.
+[in] | include_metadata | true, if table metadata should be included. |
Status kudu::client::KuduScanTokenBuilder::IncludeTabletMetadata | +( | +bool | +include_metadata | ) | ++ |
If the tablet metadata is included on the scan token a GetTableLocations RPC call to the master can be avoided when scanning with a scanner constructed from a scan token.
+[in] | include_metadata | true, if table metadata should be included. |
Status kudu::client::KuduScanTokenBuilder::SetBatchSizeBytes | +( | +uint32_t | +batch_size | ) | ++ |
Set the hint for the size of the next batch in bytes.
+[in] | batch_size | Batch size to set (in bytes). If set to 0, the first call to the tablet server won't return data. |
Status kudu::client::KuduScanTokenBuilder::SetCacheBlocks | +( | +bool | +cache_blocks | ) | ++ |
Set the block caching policy.
+[in] | cache_blocks | If true , scanned data blocks will be cached in memory and made available for future scans. Default is true . |
Status kudu::client::KuduScanTokenBuilder::SetFaultTolerant | +( | +) | ++ |
Make scans resumable at another tablet server if current server fails.
+Scans are by default non fault-tolerant, and scans will fail if scanning an individual tablet fails (for example, if a tablet server crashes in the middle of a tablet scan). If this method is called, scans will be resumed at another tablet server in the case of failure.
+Fault-tolerant scans typically have lower throughput than non fault-tolerant scans. Fault tolerant scans use READ_AT_SNAPSHOT
mode: if no snapshot timestamp is provided, the server will pick one.
Status kudu::client::KuduScanTokenBuilder::SetProjectedColumnIndexes | +( | +const std::vector< int > & | +col_indexes | ) | ++ |
Set the column projection by passing the column indexes to read.
+Set the column projection used for this scanner by passing the column indices to read. A call to this method overrides any previous call to SetProjectedColumnNames() or SetProjectedColumnIndexes().
+[in] | col_indexes | Column indices for the projection. |
Status kudu::client::KuduScanTokenBuilder::SetProjectedColumnNames | +( | +const std::vector< std::string > & | +col_names | ) | ++ |
Set the column projection by passing the column names to read.
+Set the column projection used for this scanner by passing the column names to read. A call of this method overrides any previous call to SetProjectedColumnNames() or SetProjectedColumnIndexes().
+[in] | col_names | Column names for the projection. |
Status kudu::client::KuduScanTokenBuilder::SetReadMode | +( | +KuduScanner::ReadMode | +read_mode | ) | ++ |
Set the ReadMode. Default is READ_LATEST
.
[in] | read_mode | Read mode to set. |
Status kudu::client::KuduScanTokenBuilder::SetSelection | +( | +KuduClient::ReplicaSelection | +selection | ) | ++ |
Set the replica selection policy while scanning.
+[in] | selection | Selection policy to set. |
Status kudu::client::KuduScanTokenBuilder::SetSnapshotMicros | +( | +uint64_t | +snapshot_timestamp_micros | ) | ++ |
Set snapshot timestamp for scans in READ_AT_SNAPSHOT
mode.
[in] | snapshot_timestamp_micros | Timestamp to set in in microseconds since the Epoch. |
Status kudu::client::KuduScanTokenBuilder::SetSnapshotRaw | +( | +uint64_t | +snapshot_timestamp | ) | ++ |
Set snapshot timestamp for scans in READ_AT_SNAPSHOT
mode (raw).
[in] | snapshot_timestamp | Timestamp to set in raw encoded form (i.e. as returned by a previous call to a server). |
void kudu::client::KuduScanTokenBuilder::SetSplitSizeBytes | +( | +uint64_t | +split_size_bytes | ) | ++ |
Set approximate data size (in bytes) for each key range that a single scan token is built for.
+[in] | split_size_bytes | The approximate target size of the data to be retrieved per scan token. If set to 0 (and that's the default, unless explicitly set by calling this method), the key ranges of the scan tokens to be produced are determined by the table's partition schema, so a single token is built per single tablet. Also see KuduScanToken::setSplitSizeBytes in the Java client. |
Status kudu::client::KuduScanTokenBuilder::SetTimeoutMillis | +( | +int | +millis | ) | ++ |
Set the maximum time that Open() and NextBatch() are allowed to take.
+[in] | millis | Timeout to set (in milliseconds). Must be greater than 0. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduScanner, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
This class is a representation of a single scan. + More...
+ +#include <client.h>
+Public Types | |
enum | ReadMode { READ_LATEST +, READ_AT_SNAPSHOT +, READ_YOUR_WRITES + } |
The read modes for scanners. More... | |
enum | OrderMode { UNORDERED +, ORDERED + } |
enum | { kScanTimeoutMillis = 30000 + } |
+Public Member Functions | |
KuduScanner (KuduTable *table) | |
Status | SetProjectedColumnNames (const std::vector< std::string > &col_names) WARN_UNUSED_RESULT |
Status | SetProjectedColumnIndexes (const std::vector< int > &col_indexes) WARN_UNUSED_RESULT |
Status | SetProjectedColumns (const std::vector< std::string > &col_names) WARN_UNUSED_RESULT |
Status | AddConjunctPredicate (KuduPredicate *pred) WARN_UNUSED_RESULT |
Status | AddLowerBound (const KuduPartialRow &key) |
Status | AddLowerBoundRaw (const Slice &key) |
Status | AddExclusiveUpperBound (const KuduPartialRow &key) |
Status | AddExclusiveUpperBoundRaw (const Slice &key) |
Status | AddLowerBoundPartitionKeyRaw (const Slice &partition_key) |
Status | AddExclusiveUpperBoundPartitionKeyRaw (const Slice &partition_key) |
Status | SetCacheBlocks (bool cache_blocks) |
Status | Open () |
Status | KeepAlive () |
void | Close () |
bool | HasMoreRows () const |
Status | NextBatch (std::vector< KuduRowResult > *rows) |
Status | NextBatch (KuduScanBatch *batch) |
Status | NextBatch (KuduColumnarScanBatch *batch) |
Status | GetCurrentServer (KuduTabletServer **server) |
const ResourceMetrics & | GetResourceMetrics () const |
Status | SetBatchSizeBytes (uint32_t batch_size) |
Status | SetSelection (KuduClient::ReplicaSelection selection) WARN_UNUSED_RESULT |
Status | SetReadMode (ReadMode read_mode) WARN_UNUSED_RESULT |
Status | SetOrderMode (OrderMode order_mode) WARN_UNUSED_RESULT |
Status | SetFaultTolerant () WARN_UNUSED_RESULT |
Status | SetSnapshotMicros (uint64_t snapshot_timestamp_micros) WARN_UNUSED_RESULT |
Status | SetSnapshotRaw (uint64_t snapshot_timestamp) WARN_UNUSED_RESULT |
Status | SetTimeoutMillis (int millis) |
KuduSchema | GetProjectionSchema () const |
sp::shared_ptr< KuduTable > | GetKuduTable () |
Status | SetLimit (int64_t limit) WARN_UNUSED_RESULT |
std::string | ToString () const |
Advanced/Unstable API | |
Modifier flags for the row format returned from the server. +
| |
+static const uint64_t | NO_FLAGS = 0 |
No flags set. | |
static const uint64_t | PAD_UNIXTIME_MICROS_TO_16_BYTES = 1 << 0 |
static const uint64_t | COLUMNAR_LAYOUT = 1 << 1 |
Status | SetRowFormatFlags (uint64_t flags) |
This class is a representation of a single scan.
+anonymous enum | +
Default scanner timeout. This is set to 3x the default RPC timeout returned by KuduClientBuilder::default_rpc_timeout().
+ +enum kudu::client::KuduScanner::OrderMode | +
Whether the rows should be returned in order.
+This affects the fault-tolerance properties of a scanner.
+enum kudu::client::KuduScanner::ReadMode | +
The read modes for scanners.
+Enumerator | |
---|---|
READ_LATEST | When In ACID terms this corresponds to Isolation mode: "Read Committed" +This is the default mode. + |
READ_AT_SNAPSHOT | When In ACID terms this, by itself, corresponds to Isolation mode "Repeatable + Read". If all writes to the scanned tablet are made externally consistent, then this corresponds to Isolation mode "Strict-Serializable". +
|
READ_YOUR_WRITES | When Reads in this mode are not repeatable: two READ_YOUR_WRITES reads, even if they provide the same propagated timestamp bound, can execute at different timestamps and thus return different results. + |
+
|
+ +explicit | +
Constructor for KuduScanner.
+[in] | table | The table to perfrom scan. The given object must remain valid for the lifetime of this scanner object. |
Status kudu::client::KuduScanner::AddConjunctPredicate | +( | +KuduPredicate * | +pred | ) | ++ |
Add a predicate for the scan.
+[in] | pred | Predicate to set. The KuduScanTokenBuilder instance takes ownership of the parameter even if a bad Status is returned. Multiple calls of this method make the specified set of predicates work in conjunction, i.e. all predicates must be true for a row to be returned. |
Status kudu::client::KuduScanner::AddExclusiveUpperBound | +( | +const KuduPartialRow & | +key | ) | ++ |
Add an upper bound (exclusive) primary key for the scan.
+If any bound is already added, this bound is intersected with that one.
+[in] | key | The key to setup the upper bound. The scanner makes a copy of the parameter, the caller may free it afterward. |
Status kudu::client::KuduScanner::AddExclusiveUpperBoundPartitionKeyRaw | +( | +const Slice & | +partition_key | ) | ++ |
Add an upper bound (exclusive) partition key for the scan.
+[in] | partition_key | The scanner makes a copy of the parameter, the caller may invalidate it afterward. |
Status kudu::client::KuduScanner::AddExclusiveUpperBoundRaw | +( | +const Slice & | +key | ) | ++ |
Add an upper bound (exclusive) primary key for the scan.
+[in] | key | The encoded primary key is an opaque slice of data. |
Status kudu::client::KuduScanner::AddLowerBound | +( | +const KuduPartialRow & | +key | ) | ++ |
Add a lower bound (inclusive) primary key for the scan.
+If any bound is already added, this bound is intersected with that one.
+[in] | key | Lower bound primary key to add. The KuduScanTokenBuilder instance does not take ownership of the parameter. |
Status kudu::client::KuduScanner::AddLowerBoundPartitionKeyRaw | +( | +const Slice & | +partition_key | ) | ++ |
Add a lower bound (inclusive) partition key for the scan.
+[in] | partition_key | The scanner makes a copy of the parameter: the caller may invalidate it afterward. |
Add lower bound for the scan.
+[in] | key | The primary key to use as an opaque slice of data. |
void kudu::client::KuduScanner::Close | +( | +) | ++ |
Close the scanner.
+Closing the scanner releases resources on the server. This call does not block, and will not ever fail, even if the server cannot be contacted.
+Status kudu::client::KuduScanner::GetCurrentServer | +( | +KuduTabletServer ** | +server | ) | ++ |
Get the KuduTabletServer that is currently handling the scan.
+More concretely, this is the server that handled the most recent Open() or NextBatch() RPC made by the server.
+[out] | server | Placeholder for the result. |
sp::shared_ptr<KuduTable> kudu::client::KuduScanner::GetKuduTable | +( | +) | ++ |
KuduSchema kudu::client::KuduScanner::GetProjectionSchema | +( | +) | +const | +
const ResourceMetrics& kudu::client::KuduScanner::GetResourceMetrics | +( | +) | +const | +
bool kudu::client::KuduScanner::HasMoreRows | +( | +) | +const | +
Check if there may be rows to be fetched from this scanner.
+true
if there may be rows to be fetched from this scanner. The method returns true
provided there's at least one more tablet left to scan, even if that tablet has no data (we'll only know once we scan it). It will also be true
after the initially opening the scanner before NextBatch is called for the first time. Status kudu::client::KuduScanner::KeepAlive | +( | +) | ++ |
Keep the current remote scanner alive.
+Keep the current remote scanner alive on the Tablet server for an additional time-to-live. This is useful if the interval in between NextBatch() calls is big enough that the remote scanner might be garbage collected. The scanner time-to-live can be configured on the tablet server via the –scanner_ttl_ms configuration flag and has a default of 60 seconds.
+This does not invalidate any previously fetched results.
+Status kudu::client::KuduScanner::NextBatch | +( | +KuduColumnarScanBatch * | +batch | ) | ++ |
Fetch the next batch of columnar results for this scanner.
+This variant may only be used when the scan is configured with the COLUMNAR_LAYOUT RowFormatFlag.
+A single KuduColumnarScanBatch object may be reused. Each subsequent call replaces the data from the previous call, and invalidates any Slice objects previously obtained from the batch.
[out] | batch | Placeholder for the result. |
Status kudu::client::KuduScanner::NextBatch | +( | +KuduScanBatch * | +batch | ) | ++ |
Fetch the next batch of results for this scanner.
+This variant may not be used when the scan is configured with the COLUMNAR_LAYOUT RowFormatFlag.
+A single KuduScanBatch object may be reused. Each subsequent call replaces the data from the previous call, and invalidates any KuduScanBatch::RowPtr objects previously obtained from the batch.
[out] | batch | Placeholder for the result. |
Status kudu::client::KuduScanner::NextBatch | +( | +std::vector< KuduRowResult > * | +rows | ) | ++ |
Get next batch of rows.
+Clears 'rows' and populates it with the next batch of rows from the tablet server. A call to NextBatch() invalidates all previously fetched results which might now be pointing to garbage memory.
+[out] | rows | Placeholder for the result. |
Status kudu::client::KuduScanner::Open | +( | +) | ++ |
Status kudu::client::KuduScanner::SetBatchSizeBytes | +( | +uint32_t | +batch_size | ) | ++ |
Set the hint for the size of the next batch in bytes.
+[in] | batch_size | The hint of batch size to set. If setting to 0 before calling Open(), it means that the first call to the tablet server won't return data. |
Status kudu::client::KuduScanner::SetCacheBlocks | +( | +bool | +cache_blocks | ) | ++ |
Set the block caching policy.
+[in] | cache_blocks | If true , scanned data blocks will be cached in memory and made available for future scans. Default is true . |
Status kudu::client::KuduScanner::SetFaultTolerant | +( | +) | ++ |
Make scans resumable at another tablet server if current server fails.
+Scans are by default non fault-tolerant, and scans will fail if scanning an individual tablet fails (for example, if a tablet server crashes in the middle of a tablet scan). If this method is called, scans will be resumed at another tablet server in the case of failure.
+Fault-tolerant scans typically have lower throughput than non fault-tolerant scans. Fault tolerant scans use READ_AT_SNAPSHOT
mode: if no snapshot timestamp is provided, the server will pick one.
Status kudu::client::KuduScanner::SetLimit | +( | +int64_t | +limit | ) | ++ |
Set the maximum number of rows the scanner should return.
+[in] | limit | Limit on the number of rows to return. |
[in] | order_mode | Result record ordering mode to set. |
Status kudu::client::KuduScanner::SetProjectedColumnIndexes | +( | +const std::vector< int > & | +col_indexes | ) | ++ |
Set the column projection by passing the column indexes to read.
+Set the column projection used for this scanner by passing the column indices to read. A call to this method overrides any previous call to SetProjectedColumnNames() or SetProjectedColumnIndexes().
+[in] | col_indexes | Column indices for the projection. |
Status kudu::client::KuduScanner::SetProjectedColumnNames | +( | +const std::vector< std::string > & | +col_names | ) | ++ |
Set the projection for the scanner using column names.
+Set the projection used for the scanner by passing column names to read. This overrides any previous call to SetProjectedColumnNames() or SetProjectedColumnIndexes().
+[in] | col_names | Column names to use for the projection. |
Status kudu::client::KuduScanner::SetProjectedColumns | +( | +const std::vector< std::string > & | +col_names | ) | ++ |
[in] | col_names | Column names to use for the projection. |
Set the ReadMode. Default is READ_LATEST
.
[in] | read_mode | Read mode to set. |
Status kudu::client::KuduScanner::SetRowFormatFlags | +( | +uint64_t | +flags | ) | ++ |
Optionally set row format modifier flags.
+If flags is RowFormatFlags::NO_FLAGS, then no modifications will be made to the row format and the default will be used.
+Some flags require server-side server-side support, thus the caller should be prepared to handle a NotSupported status in Open() and NextBatch().
+Example usage (without error handling, for brevity):
[in] | flags | Row format modifier flags to set. |
Status kudu::client::KuduScanner::SetSelection | +( | +KuduClient::ReplicaSelection | +selection | ) | ++ |
Set the replica selection policy while scanning.
+[in] | selection | The policy to set. |
Status kudu::client::KuduScanner::SetSnapshotMicros | +( | +uint64_t | +snapshot_timestamp_micros | ) | ++ |
Set snapshot timestamp for scans in READ_AT_SNAPSHOT
mode.
[in] | snapshot_timestamp_micros | Timestamp to set in in microseconds since the Epoch. |
Status kudu::client::KuduScanner::SetSnapshotRaw | +( | +uint64_t | +snapshot_timestamp | ) | ++ |
Set snapshot timestamp for scans in READ_AT_SNAPSHOT
mode (raw).
[in] | snapshot_timestamp | Timestamp to set in raw encoded form (i.e. as returned by a previous call to a server). |
Status kudu::client::KuduScanner::SetTimeoutMillis | +( | +int | +millis | ) | ++ |
Set the maximum time that Open() and NextBatch() are allowed to take.
+[in] | millis | Timeout to set (in milliseconds). Must be greater than 0. |
std::string kudu::client::KuduScanner::ToString | +( | +) | +const | +
+
|
+ +static | +
Enable column-oriented data transfer. The server will transfer data to the client in a columnar format rather than a row-wise format. The KuduColumnarScanBatch API must be used to fetch results from this scan.
+NOTE: older versions of the Kudu server do not support this feature. Clients aiming to support compatibility with previous versions should have a fallback code path.
+ +
+
|
+ +static | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduSchema, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A representation of a table's schema. + More...
+ +#include <schema.h>
+Public Member Functions | |
KuduSchema (const KuduSchema &other) | |
Status | Reset (const std::vector< KuduColumnSchema > &columns, int key_columns) WARN_UNUSED_RESULT |
bool | Equals (const KuduSchema &other) const |
bool | operator== (const KuduSchema &rhs) const |
bool | operator!= (const KuduSchema &rhs) const |
KuduColumnSchema | Column (size_t idx) const |
bool | HasColumn (const std::string &col_name, KuduColumnSchema *col_schema) const |
size_t | num_columns () const |
void | GetPrimaryKeyColumnIndexes (std::vector< int > *indexes) const |
int | GetAutoIncrementingColumnIndex () const |
KuduPartialRow * | NewRow () const |
std::string | ToString () const |
Assign/copy the schema | |
KuduSchema & | operator= (const KuduSchema &other) |
void | CopyFrom (const KuduSchema &other) |
+Static Public Member Functions | |
static const char *const | GetAutoIncrementingColumnName () |
A representation of a table's schema.
+kudu::client::KuduSchema::KuduSchema | +( | +const KuduSchema & | +other | ) | ++ |
Create a KuduSchema object as a copy of the other one.
+[in] | other | The other KuduSchema object to use as a reference. |
KuduColumnSchema kudu::client::KuduSchema::Column | +( | +size_t | +idx | ) | +const | +
[in] | idx | Column index. |
void kudu::client::KuduSchema::CopyFrom | +( | +const KuduSchema & | +other | ) | ++ |
[in] | other | The source KuduSchema object to use as a reference. |
bool kudu::client::KuduSchema::Equals | +( | +const KuduSchema & | +other | ) | +const | +
Check whether the schema is identical to the other one.
+[in] | other | The other KuduSchema object to compare with. |
true
iff this KuduSchema object is identical to the specified one. int kudu::client::KuduSchema::GetAutoIncrementingColumnIndex | +( | +) | +const | +
Get the index of the auto incrementing column within this Schema.
+
+
|
+ +static | +
Utility function to return the actual name of the auto incrementing column.
+void kudu::client::KuduSchema::GetPrimaryKeyColumnIndexes | +( | +std::vector< int > * | +indexes | ) | +const | +
Get the indexes of the primary key columns within this Schema.
+[out] | indexes | The placeholder for the result. |
bool kudu::client::KuduSchema::HasColumn | +( | +const std::string & | +col_name, | +
+ | + | KuduColumnSchema * | +col_schema | +
+ | ) | +const | +
[in] | col_name | Column name. |
[out] | col_schema | If not null pointer, then the schema for the specified column. |
true
iff the specified column exists. KuduPartialRow* kudu::client::KuduSchema::NewRow | +( | +) | +const | +
Create a new row corresponding to this schema.
+size_t kudu::client::KuduSchema::num_columns | +( | +) | +const | +
bool kudu::client::KuduSchema::operator!= | +( | +const KuduSchema & | +rhs | ) | +const | +
Check whether the schema is not identical to the other one.
+[in] | rhs | KuduSchema object to compare this one with. |
true
iff this KuduSchema object is not identical to the specified one. KuduSchema& kudu::client::KuduSchema::operator= | +( | +const KuduSchema & | +other | ) | ++ |
[in] | other | The source KuduSchema object to use as a reference. |
bool kudu::client::KuduSchema::operator== | +( | +const KuduSchema & | +rhs | ) | +const | +
Check whether the schema is identical to the other one.
+[in] | rhs | KuduSchema object to compare this one with. |
true
iff this KuduSchema object is identical to the specified one. Status kudu::client::KuduSchema::Reset | +( | +const std::vector< KuduColumnSchema > & | +columns, | +
+ | + | int | +key_columns | +
+ | ) | ++ |
[in] | columns | Per-column schema information. |
[in] | key_columns | Number of key columns in the schema. |
std::string kudu::client::KuduSchema::ToString | +( | +) | +const | +
Stringify this KuduSchema.
+
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduSchemaBuilder, including all inherited members.
+AddColumn(const std::string &name) | kudu::client::KuduSchemaBuilder | |
Build(KuduSchema *schema) | kudu::client::KuduSchemaBuilder | |
KuduSchemaBuilder() (defined in kudu::client::KuduSchemaBuilder) | kudu::client::KuduSchemaBuilder | |
SetNonUniquePrimaryKey(const std::vector< std::string > &key_col_names) | kudu::client::KuduSchemaBuilder | |
SetPrimaryKey(const std::vector< std::string > &key_col_names) | kudu::client::KuduSchemaBuilder | |
~KuduSchemaBuilder() (defined in kudu::client::KuduSchemaBuilder) | kudu::client::KuduSchemaBuilder |
+ Kudu C++ client API
+
+ |
+
Builder API for constructing a KuduSchema object. + More...
+ +#include <schema.h>
+Public Member Functions | |
KuduColumnSpec * | AddColumn (const std::string &name) |
KuduSchemaBuilder * | SetPrimaryKey (const std::vector< std::string > &key_col_names) |
KuduSchemaBuilder * | SetNonUniquePrimaryKey (const std::vector< std::string > &key_col_names) |
Status | Build (KuduSchema *schema) |
Builder API for constructing a KuduSchema object.
+The API here is a "fluent" style of programming, such that the resulting code looks somewhat like a SQL "CREATE TABLE" statement. For example:
+SQL:
is represented as:
KuduColumnSpec* kudu::client::KuduSchemaBuilder::AddColumn | +( | +const std::string & | +name | ) | ++ |
Add a column with the specified name to the schema.
+[in] | name | Name of the column to add. |
Status kudu::client::KuduSchemaBuilder::Build | +( | +KuduSchema * | +schema | ) | ++ |
Build the schema based on current configuration of the builder object.
+[out] | schema | The placeholder for the result schema. Upon successful completion, the parameter is reset to the result of this builder: literally, calling KuduSchema::Reset() on the parameter. |
KuduSchemaBuilder* kudu::client::KuduSchemaBuilder::SetNonUniquePrimaryKey | +( | +const std::vector< std::string > & | +key_col_names | ) | ++ |
Set the non-unique primary key of the new Schema based on the given column names.
+This may be used to specify a compound non-unique primary key.
+[in] | key_col_names | Names of the columns to include into the compound non-unique primary key. |
KuduSchemaBuilder* kudu::client::KuduSchemaBuilder::SetPrimaryKey | +( | +const std::vector< std::string > & | +key_col_names | ) | ++ |
Set the primary key of the new Schema based on the given column names.
+This may be used to specify a compound primary key.
+[in] | key_col_names | Names of the columns to include into the compound primary key. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduSession, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
Representation of a Kudu client session. + More...
+ +#include <client.h>
+Public Types | |
enum | FlushMode { AUTO_FLUSH_SYNC +, AUTO_FLUSH_BACKGROUND +, MANUAL_FLUSH + } |
Modes of flush operations. More... | |
enum | ExternalConsistencyMode { CLIENT_PROPAGATED +, COMMIT_WAIT + } |
The possible external consistency modes on which Kudu operates. More... | |
+Public Member Functions | |
Status | SetFlushMode (FlushMode m) WARN_UNUSED_RESULT |
Status | SetExternalConsistencyMode (ExternalConsistencyMode m) WARN_UNUSED_RESULT |
Status | SetMutationBufferSpace (size_t size_bytes) WARN_UNUSED_RESULT |
Status | SetMutationBufferFlushWatermark (double watermark_pct) WARN_UNUSED_RESULT |
Status | SetMutationBufferFlushInterval (unsigned int millis) WARN_UNUSED_RESULT |
Status | SetMutationBufferMaxNum (unsigned int max_num) WARN_UNUSED_RESULT |
void | SetTimeoutMillis (int millis) |
Status | Apply (KuduWriteOperation *write_op) WARN_UNUSED_RESULT |
Status | Flush () WARN_UNUSED_RESULT |
void | FlushAsync (KuduStatusCallback *cb) |
Status | Close () WARN_UNUSED_RESULT |
bool | HasPendingOperations () const |
int | CountBufferedOperations () const |
Status | SetErrorBufferSpace (size_t size_bytes) |
int | CountPendingErrors () const |
void | GetPendingErrors (std::vector< KuduError * > *errors, bool *overflowed) |
KuduClient * | client () const |
const ResourceMetrics & | GetWriteOpMetrics () const |
Representation of a Kudu client session.
+A KuduSession belongs to a specific KuduClient, and represents a context in which all read/write data access should take place. Within a session, multiple operations may be accumulated and batched together for better efficiency. Settings like timeouts, priorities, and trace IDs are also set per session.
+A KuduSession's main purpose is for grouping together multiple data-access operations together into batches or transactions. It is important to note the distinction between these two:
+KuduSession is separate from KuduTable because a given batch or transaction may span multiple tables. This is particularly important in the future when we add ACID support, but even in the context of batching, we may be able to coalesce writes to different tables hosted on the same server into the same RPC.
+KuduSession is separate from KuduClient because, in a multi-threaded application, different threads may need to concurrently execute transactions. Similar to a JDBC "session", transaction boundaries will be delineated on a per-session basis – in between a "BeginTransaction" and "Commit" call on a given session, all operations will be part of the same transaction. Meanwhile another concurrent Session object can safely run non-transactional work or other transactions without interfering.
+Additionally, there is a guarantee that writes from different sessions do not get batched together into the same RPCs – this means that latency-sensitive clients can run through the same KuduClient object as throughput-oriented clients, perhaps by setting the latency-sensitive session's timeouts low and priorities high. Without the separation of batches, a latency-sensitive single-row insert might get batched along with 10MB worth of inserts from the batch writer, thus delaying the response significantly.
+Though we currently do not have transactional support, users will be forced to use a KuduSession to instantiate reads as well as writes. This will make it more straight-forward to add RW transactions in the future without significant modifications to the API.
+Users who are familiar with the Hibernate ORM framework should find this concept of a Session familiar.
+enum kudu::client::KuduSession::ExternalConsistencyMode | +
The possible external consistency modes on which Kudu operates.
+Enumerator | |
---|---|
CLIENT_PROPAGATED | The response to any write will contain a timestamp. Any further calls from the same client to other servers will update those servers with that timestamp. Following write operations from the same client will be assigned timestamps that are strictly higher, enforcing external consistency without having to wait or incur any latency penalties. +In order to maintain external consistency for writes between two different clients in this mode, the user must forward the timestamp from the first client to the second by using KuduClient::GetLatestObservedTimestamp() and KuduClient::SetLatestObservedTimestamp(). +This is the default external consistency mode. +
|
COMMIT_WAIT | The server will guarantee that write operations from the same or from other client are externally consistent, without the need to propagate timestamps across clients. This is done by making write operations wait until there is certainty that all follow up write operations (operations that start after the previous one finishes) will be assigned a timestamp that is strictly higher, enforcing external consistency. +
|
enum kudu::client::KuduSession::FlushMode | +
Modes of flush operations.
+Enumerator | |
---|---|
AUTO_FLUSH_SYNC | Every write will be sent to the server in-band with the Apply() call. No batching will occur. In this mode, the Flush() call never has any effect, since each Apply() call has already flushed the buffer. This is the default flush mode. + |
AUTO_FLUSH_BACKGROUND | Apply() calls will return immediately (unless there is not enough buffer space to accommodate the newly added operations), but the writes will be sent in the background, potentially batched together with other writes from the same session. If there is not sufficient buffer space, Apply() blocks for buffer space to become available. +Because writes are applied in the background, any errors will be stored in a session-local buffer. Call CountPendingErrors() or GetPendingErrors() to retrieve them. +In this mode, calling the FlushAsync() or Flush() methods causes a flush that normally would have happened at some point in the near future to happen right now. The Flush() call can be used to block until the current batch is sent and the reclaimed space is available for new operations. +
|
MANUAL_FLUSH | Apply() calls will return immediately, and the writes will not be sent until the user calls Flush(). If the buffer runs past the configured space limit, then Apply() will return an error. +
|
Status kudu::client::KuduSession::Apply | +( | +KuduWriteOperation * | +write_op | ) | ++ |
Apply the write operation.
+The behavior of this function depends on the current flush mode. Regardless of flush mode, however, Apply() may begin to perform processing in the background for the call (e.g. looking up the tablet, etc). Given that, an error may be queued into the PendingErrors structure prior to flushing, even in MANUAL_FLUSH
mode.
In case of any error, which may occur during flushing or because the write_op is malformed, the write_op is stored in the session's error collector which may be retrieved at any time.
+A KuduSession accumulates write operations submitted via the Apply() method in mutation buffers. A KuduSession always has at least one mutation buffer. In any flush mode, this call may block if the maximum number of mutation buffers per session is reached (use KuduSession::SetMutationBufferMaxNum() to set the limit on maximum number of batchers).
+[in] | write_op | Operation to apply. This method transfers the write_op's ownership to the KuduSession. |
KuduClient* kudu::client::KuduSession::client | +( | +) | +const | +
Status kudu::client::KuduSession::Close | +( | +) | ++ |
int kudu::client::KuduSession::CountBufferedOperations | +( | +) | +const | +
Get number of buffered operations (not the same as 'pending').
+Note that this is different than HasPendingOperations() above, which includes operations which have been sent and not yet responded to.
+This method is most relevant in MANUAL_FLUSH
mode, where the result count stays valid until next explicit flush or Apply() call. There is not much sense using this method in other flush modes:
AUTO_FLUSH_SYNC
mode, the data is immediately put en-route to the destination by Apply() method itself, so this method always returns zero. AUTO_FLUSH_BACKGROUND
mode, the result count returned by this method expires unpredictably and there isn't any guaranteed validity interval for the result: the background flush task can run any moment, invalidating the result.int kudu::client::KuduSession::CountPendingErrors | +( | +) | +const | +
Get error count for pending operations.
+Errors may accumulate in session's lifetime; use this method to see how many errors happened since last call of GetPendingErrors() method. The error count includes both the accumulated and dropped errors. An error might be dropped due to the limit on the error buffer size; see the SetErrorBufferSpace() method for details.
+Status kudu::client::KuduSession::Flush | +( | +) | ++ |
Flush any pending writes.
+This method initiates flushing of the current batch of buffered write operations, if any, and then waits for the completion of all pending operations of the session. I.e., after successful return from this method no pending operations should be left in the session.
+In AUTO_FLUSH_SYNC
mode, calling this method has no effect, since every Apply() call flushes itself inline.
void kudu::client::KuduSession::FlushAsync | +( | +KuduStatusCallback * | +cb | ) | ++ |
Flush any pending writes asynchronously.
+This method schedules a background flush of the latest batch of buffered write operations. Provided callback is invoked upon the flush completion of the latest batch of buffered write operations. If there were errors while flushing the operations, corresponding 'not OK' status is passed as a parameter for the callback invocation. Callers should then use GetPendingErrors() to determine which specific operations failed.
+In the case that the async version of this method is used, then the callback will be called upon completion of the operations which were buffered since the last flush. In other words, in the following sequence:
... callback_2
will be triggered once b
has been inserted, regardless of whether a
has completed or not. That means there might be pending operations left in prior batches even after the callback has been invoked to report on the flush status of the latest batch.
[in] | cb | Callback to call upon flush completion. The cb must remain valid until it is invoked. |
void kudu::client::KuduSession::GetPendingErrors | +( | +std::vector< KuduError * > * | +errors, | +
+ | + | bool * | +overflowed | +
+ | ) | ++ |
Get information on errors from previous session activity.
+The information on errors are reset upon calling this method.
+[out] | errors | Pointer to the container to fill with error info objects. Caller takes ownership of the returned errors in the container. |
[out] | overflowed | If there were more errors than could be held in the session's error buffer, then overflowed is set to true . |
const ResourceMetrics& kudu::client::KuduSession::GetWriteOpMetrics | +( | +) | +const | +
bool kudu::client::KuduSession::HasPendingOperations | +( | +) | +const | +
Check if there are any pending operations in this session.
+true
if there are operations which have not yet been delivered to the cluster. This may include buffered operations (i.e. those that have not yet been flushed) as well as in-flight operations (i.e. those that are in the process of being sent to the servers).Status kudu::client::KuduSession::SetErrorBufferSpace | +( | +size_t | +size_bytes | ) | ++ |
Set limit on maximum buffer (memory) size used by this session's errors. By default, when a session is created, there is no limit on maximum size.
+The session's error buffer contains information on failed write operations. In most cases, the error contains the row which would be applied as is. If the error buffer space limit is set, the number of errors which fit into the buffer varies depending on error conditions, write operation types (insert/update/delete), and write operation row sizes.
+When the limit is set, the session will drop the first error that would overflow the buffer as well as all subsequent errors. To resume the accumulation of session errors, it's necessary to flush the current contents of the error buffer using the GetPendingErrors() method.
+[in] | size_bytes | Limit on the maximum memory size consumed by collected session errors, where 0 means 'unlimited'. |
Status kudu::client::KuduSession::SetExternalConsistencyMode | +( | +ExternalConsistencyMode | +m | ) | ++ |
Set external consistency mode for the session.
+[in] | m | External consistency mode to set. |
Set the flush mode.
+[in] | m | Flush mode to set. |
Status kudu::client::KuduSession::SetMutationBufferFlushInterval | +( | +unsigned int | +millis | ) | ++ |
Set the interval for time-based flushing of the mutation buffer.
+In some cases, while running in AUTO_FLUSH_BACKGROUND mode, the size of the mutation buffer for pending operations and the flush watermark for fresh operations may be too high for the rate of incoming data: it would take too long to accumulate enough data in the buffer to trigger flushing. I.e., it makes sense to flush the accumulated operations if the prior flush happened long time ago. This method sets the wait interval for the time-based flushing which takes place along with the flushing triggered by the over-the-watermark criterion. By default, the interval is set to 1000 ms (i.e. 1 second).
+[in] | millis | The duration of the interval for the time-based flushing, in milliseconds. |
Status kudu::client::KuduSession::SetMutationBufferFlushWatermark | +( | +double | +watermark_pct | ) | ++ |
Set the buffer watermark to trigger flush in AUTO_FLUSH_BACKGROUND mode.
+This method sets the watermark for fresh operations in the buffer when running in AUTO_FLUSH_BACKGROUND mode: once the specified threshold is reached, the session starts sending the accumulated write operations to the appropriate tablet servers. By default, the buffer flush watermark is to to 50%.
+[in] | watermark_pct | Watermark level as percentage of the mutation buffer size. |
Status kudu::client::KuduSession::SetMutationBufferMaxNum | +( | +unsigned int | +max_num | ) | ++ |
Set the maximum number of mutation buffers per KuduSession object.
+A KuduSession accumulates write operations submitted via the Apply() method in mutation buffers. A KuduSession always has at least one mutation buffer. The mutation buffer which accumulates new incoming operations is called the current mutation buffer. The current mutation buffer is flushed either explicitly using the KuduSession::Flush() and/or KuduSession::FlushAsync() methods or it's done by the KuduSession automatically if running in AUTO_FLUSH_BACKGROUND mode. After flushing the current mutation buffer, a new buffer is created upon calling KuduSession::Apply(), provided the limit is not exceeded. A call to KuduSession::Apply() blocks if it's at the maximum number of buffers allowed; the call unblocks as soon as one of the pending batchers finished flushing and a new batcher can be created.
+The minimum setting for this parameter is 1 (one). The default setting for this parameter is 2 (two).
+[in] | max_num | The maximum number of mutation buffers per KuduSession object to hold the applied operations. Use 0 to set the maximum number of concurrent mutation buffers to unlimited. |
Status kudu::client::KuduSession::SetMutationBufferSpace | +( | +size_t | +size_bytes | ) | ++ |
Set the amount of buffer space used by this session for outbound writes.
+The effect of the buffer size varies based on the flush mode of the session:
By default, the buffer space is set to 7 MiB (i.e. 7 * 1024 * 1024 bytes).
+[in] | size_bytes | Size of the buffer space to set (number of bytes). |
void kudu::client::KuduSession::SetTimeoutMillis | +( | +int | +millis | ) | ++ |
Set the timeout for writes made in this session.
+[in] | millis | Timeout to set in milliseconds; should be greater or equal to 0. If the parameter value is less than 0, it's implicitly set to 0. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduStatusCallback, including all inherited members.
+KuduStatusCallback() (defined in kudu::client::KuduStatusCallback) | kudu::client::KuduStatusCallback | inline |
Run(const Status &s)=0 | kudu::client::KuduStatusCallback | pure virtual |
~KuduStatusCallback() (defined in kudu::client::KuduStatusCallback) | kudu::client::KuduStatusCallback | inlinevirtual |
+ Kudu C++ client API
+
+ |
+
The interface for all status callbacks. + More...
+ +#include <callbacks.h>
+Public Member Functions | |
virtual void | Run (const Status &s)=0 |
The interface for all status callbacks.
+
+
|
+ +pure virtual | +
Notify/report on the status.
+[in] | s | The status to report. |
Implemented in kudu::client::KuduStatusFunctionCallback< T >, and kudu::client::KuduStatusMemberCallback< T >.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduStatusFunctionCallback< T >, including all inherited members.
+FunctionType typedef | kudu::client::KuduStatusFunctionCallback< T > | |
KuduStatusCallback() (defined in kudu::client::KuduStatusCallback) | kudu::client::KuduStatusCallback | inline |
KuduStatusFunctionCallback(FunctionType function, T arg) | kudu::client::KuduStatusFunctionCallback< T > | inline |
Run(const Status &s) OVERRIDE | kudu::client::KuduStatusFunctionCallback< T > | inlinevirtual |
~KuduStatusCallback() (defined in kudu::client::KuduStatusCallback) | kudu::client::KuduStatusCallback | inlinevirtual |
+ Kudu C++ client API
+
+ |
+
The status callback that invokes a function by pointer with a single argument. + More...
+ +#include <callbacks.h>
+Public Types | |
+typedef void(* | FunctionType) (T arg, const Status &s) |
A handy typedef for the function with appropriate signature. | |
+Public Member Functions | |
KuduStatusFunctionCallback (FunctionType function, T arg) | |
virtual void | Run (const Status &s) OVERRIDE |
The status callback that invokes a function by pointer with a single argument.
+
+
|
+ +inline | +
Build an instance of KuduStatusFunctionCallback.
+[in] | function | A pointer to the status report function to invoke with the arg argument. |
[in] | arg | An argument for the function invocation. |
+
|
+ +inlinevirtual | +
Notify/report on the status.
+[in] | s | The status to report. |
Implements kudu::client::KuduStatusCallback.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduStatusMemberCallback< T >, including all inherited members.
+KuduStatusCallback() (defined in kudu::client::KuduStatusCallback) | kudu::client::KuduStatusCallback | inline |
KuduStatusMemberCallback(T *object, MemberType member) | kudu::client::KuduStatusMemberCallback< T > | inline |
MemberType typedef | kudu::client::KuduStatusMemberCallback< T > | |
Run(const Status &s) OVERRIDE | kudu::client::KuduStatusMemberCallback< T > | inlinevirtual |
~KuduStatusCallback() (defined in kudu::client::KuduStatusCallback) | kudu::client::KuduStatusCallback | inlinevirtual |
+ Kudu C++ client API
+
+ |
+
The status callback that invokes a member function of an object. + More...
+ +#include <callbacks.h>
+Public Types | |
+typedef void(T::* | MemberType) (const Status &s) |
A handy typedef for the member with appropriate signature. | |
+Public Member Functions | |
KuduStatusMemberCallback (T *object, MemberType member) | |
virtual void | Run (const Status &s) OVERRIDE |
The status callback that invokes a member function of an object.
+
+
|
+ +inline | +
Build an instance of the KuduStatusMemberCallback class.
+[in] | object | A pointer to the object. |
[in] | member | A pointer to the member function of the object to invoke. |
+
|
+ +inlinevirtual | +
Notify/report on the status.
+[in] | s | The status to report. |
Implements kudu::client::KuduStatusCallback.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduTable, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A representation of a table on a particular cluster. + More...
+ +#include <client.h>
+Public Member Functions | |
const std::string & | name () const |
const std::string & | id () const |
const KuduSchema & | schema () const |
const std::string & | comment () const |
int | num_replicas () const |
const std::string & | owner () const |
KuduInsert * | NewInsert () |
KuduInsertIgnore * | NewInsertIgnore () |
KuduUpsert * | NewUpsert () |
KuduUpsertIgnore * | NewUpsertIgnore () |
KuduUpdate * | NewUpdate () |
KuduUpdateIgnore * | NewUpdateIgnore () |
KuduDelete * | NewDelete () |
KuduDeleteIgnore * | NewDeleteIgnore () |
KuduPredicate * | NewComparisonPredicate (const Slice &col_name, KuduPredicate::ComparisonOp op, KuduValue *value) |
KuduPredicate * | NewInBloomFilterPredicate (const Slice &col_name, std::vector< KuduBloomFilter * > *bloom_filters) |
KuduPredicate * | NewInListPredicate (const Slice &col_name, std::vector< KuduValue * > *values) |
KuduPredicate * | NewIsNotNullPredicate (const Slice &col_name) |
KuduPredicate * | NewIsNullPredicate (const Slice &col_name) |
KuduClient * | client () const |
const PartitionSchema & | partition_schema () const |
const std::map< std::string, std::string > & | extra_configs () const |
Advanced/Unstable API | |
There are no guarantees on the stability of this client API. + | |
KuduPredicate * | NewInBloomFilterPredicate (const Slice &col_name, const std::vector< Slice > &bloom_filters) |
A representation of a table on a particular cluster.
+A KuduTable holds the current schema of the table. Any given KuduTable object belongs to a specific KuduClient object.
+Upon construction, the table is looked up in the catalog (or catalog cache), and the schema fetched for introspection.
+This class is also a factory for write operation on the table. The provided operations are:
KuduClient* kudu::client::KuduTable::client | +( | +) | +const | +
const std::string& kudu::client::KuduTable::comment | +( | +) | +const | +
const std::map<std::string, std::string>& kudu::client::KuduTable::extra_configs | +( | +) | +const | +
const std::string& kudu::client::KuduTable::id | +( | +) | +const | +
Get the table's ID.
+This is an internal identifier which uniquely identifies a table. If the table is deleted and recreated with the same name, the ID will distinguish the old table from the new.
+const std::string& kudu::client::KuduTable::name | +( | +) | +const | +
KuduPredicate* kudu::client::KuduTable::NewComparisonPredicate | +( | +const Slice & | +col_name, | +
+ | + | KuduPredicate::ComparisonOp | +op, | +
+ | + | KuduValue * | +value | +
+ | ) | ++ |
Create a new comparison predicate.
+This method creates new instance of a comparison predicate which can be used for scanners on this table object.
+[in] | col_name | Name of column to use for comparison. |
[in] | op | Comparison operator to use. |
[in] | value | The type of the value must correspond to the type of the column to which the predicate is to be applied. For example, if the given column is any type of integer, the KuduValue should also be an integer, with its value in the valid range for the column type. No attempt is made to cast between floating point and integer values, or numeric and string values. |
value
Non-NULL is returned both in success and error cases. In the case of an error (e.g. invalid column name), a non-NULL value is still returned. The error will be returned when attempting to add this predicate to a KuduScanner. KuduDelete* kudu::client::KuduTable::NewDelete | +( | +) | ++ |
DELETE
operation for this table. It is the caller's responsibility to free the result, unless it is passed to KuduSession::Apply(). KuduDeleteIgnore* kudu::client::KuduTable::NewDeleteIgnore | +( | +) | ++ |
DELETE_IGNORE
operation for this table. It is the caller's responsibility to free the result, unless it is passed to KuduSession::Apply(). KuduPredicate* kudu::client::KuduTable::NewInBloomFilterPredicate | +( | +const Slice & | +col_name, | +
+ | + | const std::vector< Slice > & | +bloom_filters | +
+ | ) | ++ |
Create a new IN Bloom filter predicate using direct BlockBloomFilter pointers which can be used for scanners on this table.
+A Bloom filter is a space-efficient probabilistic data structure used to test set membership with a possibility of false positive matches.
+IN list predicate can be used with small number of values; on the other hand with IN Bloom filter predicate large number of values can be tested for membership in a space-efficient manner.
+IN Bloom filter predicate may be automatically disabled if determined to be ineffective in filtering rows during scan requests.
+Users are expected to perform further filtering to guard against false positives and automatic disablement of an ineffective Bloom filter predicate to get precise set membership information.
+[in] | col_name | Name of the column to which the predicate applies. |
bloom_filters | Vector of BlockBloomFilter pointers that contain the values inserted to match against the column. The column value must match against all the supplied Bloom filters to be returned by the scanner. On return, regardless of success or error, the returned predicate will NOT take ownership of the pointers contained in bloom_filters and caller is responsible for the lifecycle management of the Bloom filters. The supplied Bloom filters are expected to remain valid for the lifetime of the KuduScanner. |
KuduPredicate* kudu::client::KuduTable::NewInBloomFilterPredicate | +( | +const Slice & | +col_name, | +
+ | + | std::vector< KuduBloomFilter * > * | +bloom_filters | +
+ | ) | ++ |
Create a new IN Bloom filter predicate which can be used for scanners on this table.
+A Bloom filter is a space-efficient probabilistic data structure used to test set membership with a possibility of false positive matches. See KuduBloomFilter
for creating Bloom filters.
IN list predicate can be used with small number of values; on the other hand with IN Bloom filter predicate large number of values can be tested for membership in a space-efficient manner.
+IN Bloom filter predicate may be automatically disabled if determined to be ineffective in filtering rows during scan requests.
+Users are expected to perform further filtering to guard against false positives and automatic disablement of an ineffective Bloom filter predicate to get precise set membership information.
+[in] | col_name | Name of the column to which the predicate applies. |
[in] | bloom_filters | Vector of Bloom filters that contain the values inserted to match against the column. The column value must match against all the supplied Bloom filters to be returned by the scanner. On return, regardless of success or error, the returned predicate will take ownership of the pointers contained in bloom_filters . |
KuduPredicate* kudu::client::KuduTable::NewInListPredicate | +( | +const Slice & | +col_name, | +
+ | + | std::vector< KuduValue * > * | +values | +
+ | ) | ++ |
Create a new IN list predicate which can be used for scanners on this table.
+The IN list predicate is used to specify a list of values that a column must match. A row is filtered from the scan if the value of the column does not equal any value from the list.
+The type of entries in the list must correspond to the type of the column to which the predicate is to be applied. For example, if the given column is any type of integer, the KuduValues should also be integers, with the values in the valid range for the column type. No attempt is made to cast between floating point and integer values, or numeric and string values.
+[in] | col_name | Name of the column to which the predicate applies. |
[in] | values | Vector of values which the column will be matched against. |
KuduInsert* kudu::client::KuduTable::NewInsert | +( | +) | ++ |
INSERT
operation for this table. It is the caller's responsibility to free the result, unless it is passed to KuduSession::Apply(). KuduInsertIgnore* kudu::client::KuduTable::NewInsertIgnore | +( | +) | ++ |
INSERT_IGNORE
operation for this table. It is the caller's responsibility to free the result, unless it is passed to KuduSession::Apply(). KuduPredicate* kudu::client::KuduTable::NewIsNotNullPredicate | +( | +const Slice & | +col_name | ) | ++ |
Create a new IS NOT NULL predicate which can be used for scanners on this table.
+[in] | col_name | Name of the column to which the predicate applies |
KuduPredicate* kudu::client::KuduTable::NewIsNullPredicate | +( | +const Slice & | +col_name | ) | ++ |
Create a new IS NULL predicate which can be used for scanners on this table.
+[in] | col_name | Name of the column to which the predicate applies |
KuduUpdate* kudu::client::KuduTable::NewUpdate | +( | +) | ++ |
UPDATE
operation for this table. It is the caller's responsibility to free the result, unless it is passed to KuduSession::Apply(). KuduUpdateIgnore* kudu::client::KuduTable::NewUpdateIgnore | +( | +) | ++ |
UPDATE_IGNORE
operation for this table. It is the caller's responsibility to free the result, unless it is passed to KuduSession::Apply(). KuduUpsert* kudu::client::KuduTable::NewUpsert | +( | +) | ++ |
UPSERT
operation for this table. It is the caller's responsibility to free the result, unless it is passed to KuduSession::Apply(). KuduUpsertIgnore* kudu::client::KuduTable::NewUpsertIgnore | +( | +) | ++ |
UPSERT_IGNORE
operation for this table. It is the caller's responsibility to free the result, unless it is passed to KuduSession::Apply(). int kudu::client::KuduTable::num_replicas | +( | +) | +const | +
const std::string& kudu::client::KuduTable::owner | +( | +) | +const | +
const PartitionSchema& kudu::client::KuduTable::partition_schema | +( | +) | +const | +
const KuduSchema& kudu::client::KuduTable::schema | +( | +) | +const | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduTableAlterer, including all inherited members.
+AddColumn(const std::string &name) | kudu::client::KuduTableAlterer | |
AddRangePartition(KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND) | kudu::client::KuduTableAlterer | |
AddRangePartition(KuduRangePartition *partition) | kudu::client::KuduTableAlterer | |
AddRangePartitionWithDimension(KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, const std::string &dimension_label, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND) | kudu::client::KuduTableAlterer | |
Alter() | kudu::client::KuduTableAlterer | |
AlterColumn(const std::string &name) | kudu::client::KuduTableAlterer | |
AlterExtraConfig(const std::map< std::string, std::string > &extra_configs) | kudu::client::KuduTableAlterer | |
DropColumn(const std::string &name) | kudu::client::KuduTableAlterer | |
DropRangePartition(KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, KuduTableCreator::RangePartitionBound lower_bound_type=KuduTableCreator::INCLUSIVE_BOUND, KuduTableCreator::RangePartitionBound upper_bound_type=KuduTableCreator::EXCLUSIVE_BOUND) | kudu::client::KuduTableAlterer | |
RenameTo(const std::string &new_name) | kudu::client::KuduTableAlterer | |
SetComment(const std::string &new_comment) | kudu::client::KuduTableAlterer | |
SetOwner(const std::string &new_owner) | kudu::client::KuduTableAlterer | |
SetTableDiskSizeLimit(int64_t disk_size_limit) | kudu::client::KuduTableAlterer | |
SetTableRowCountLimit(int64_t row_count_limit) | kudu::client::KuduTableAlterer | |
timeout(const MonoDelta &timeout) | kudu::client::KuduTableAlterer | |
wait(bool wait) | kudu::client::KuduTableAlterer | |
~KuduTableAlterer() (defined in kudu::client::KuduTableAlterer) | kudu::client::KuduTableAlterer |
+ Kudu C++ client API
+
+ |
+
Alters an existing table based on the provided steps. + More...
+ +#include <client.h>
Alters an existing table based on the provided steps.
+Create a new instance of a table alterer using KuduClient::NewTableAlterer(). An example of usage:
KuduColumnSpec* kudu::client::KuduTableAlterer::AddColumn | +( | +const std::string & | +name | ) | ++ |
Add a new column to the table.
+When adding a column, you must specify the default value of the new column using KuduColumnSpec::DefaultValue(...).
+name | Name of the column do add. |
KuduTableAlterer* kudu::client::KuduTableAlterer::AddRangePartition | +( | +KuduPartialRow * | +lower_bound, | +
+ | + | KuduPartialRow * | +upper_bound, | +
+ | + | KuduTableCreator::RangePartitionBound | +lower_bound_type = KuduTableCreator::INCLUSIVE_BOUND , |
+
+ | + | KuduTableCreator::RangePartitionBound | +upper_bound_type = KuduTableCreator::EXCLUSIVE_BOUND |
+
+ | ) | ++ |
Add a range partition to the table with the specified lower bound and upper bound.
+[in] | lower_bound | The lower bound of the range partition to add. If the row is empty, then the lower bound is unbounded. If any of the columns are unset, the logical minimum value for the column's type will be used by default. |
[in] | upper_bound | The upper bound of the range partition to add. If the row is empty, then the upper bound is unbounded. If any of the individual columns are unset, the logical minimum value for the column' type will be used by default. |
[in] | lower_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to inclusive. |
[in] | upper_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to exclusive. |
KuduTableAlterer* kudu::client::KuduTableAlterer::AddRangePartition | +( | +KuduRangePartition * | +partition | ) | ++ |
Add the specified range partition with custom hash schema to the table.
+[in] | partition | The range partition to be created: it can have a custom hash schema. |
KuduTableAlterer* kudu::client::KuduTableAlterer::AddRangePartitionWithDimension | +( | +KuduPartialRow * | +lower_bound, | +
+ | + | KuduPartialRow * | +upper_bound, | +
+ | + | const std::string & | +dimension_label, | +
+ | + | KuduTableCreator::RangePartitionBound | +lower_bound_type = KuduTableCreator::INCLUSIVE_BOUND , |
+
+ | + | KuduTableCreator::RangePartitionBound | +upper_bound_type = KuduTableCreator::EXCLUSIVE_BOUND |
+
+ | ) | ++ |
Add a range partition to the table with dimension label.
+[in] | lower_bound | The lower bound of the range partition to add. If the row is empty, then the lower bound is unbounded. If any of the columns are unset, the logical minimum value for the column's type will be used by default. |
[in] | upper_bound | The upper bound of the range partition to add. If the row is empty, then the upper bound is unbounded. If any of the individual columns are unset, the logical minimum value for the column' type will be used by default. |
[in] | dimension_label | The dimension label for the tablet to be created. |
[in] | lower_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to inclusive. |
[in] | upper_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to exclusive. |
Status kudu::client::KuduTableAlterer::Alter | +( | +) | ++ |
KuduColumnSpec* kudu::client::KuduTableAlterer::AlterColumn | +( | +const std::string & | +name | ) | ++ |
Alter an existing column.
+[in] | name | Name of the column to alter. |
KuduTableAlterer* kudu::client::KuduTableAlterer::AlterExtraConfig | +( | +const std::map< std::string, std::string > & | +extra_configs | ) | ++ |
Change the table's extra configuration properties.
+[in] | extra_configs | The table's extra configuration properties. |
KuduTableAlterer* kudu::client::KuduTableAlterer::DropColumn | +( | +const std::string & | +name | ) | ++ |
Drops an existing column from the table.
+[in] | name | Name of the column to alter. |
KuduTableAlterer* kudu::client::KuduTableAlterer::DropRangePartition | +( | +KuduPartialRow * | +lower_bound, | +
+ | + | KuduPartialRow * | +upper_bound, | +
+ | + | KuduTableCreator::RangePartitionBound | +lower_bound_type = KuduTableCreator::INCLUSIVE_BOUND , |
+
+ | + | KuduTableCreator::RangePartitionBound | +upper_bound_type = KuduTableCreator::EXCLUSIVE_BOUND |
+
+ | ) | ++ |
Drop the range partition from the table with the specified lower bound and upper bound. The bounds must match an existing range partition exactly, and may not span multiple range partitions.
+[in] | lower_bound | The inclusive lower bound of the range partition to drop. If the row is empty, then the lower bound is unbounded. If any of the columns are unset, the logical minimum value for the column's type will be used by default. |
[in] | upper_bound | The exclusive upper bound of the range partition to add. If the row is empty, then the upper bound is unbounded. If any of the individual columns are unset, the logical minimum value for the column' type will be used by default. |
[in] | lower_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to inclusive. |
[in] | upper_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to exclusive. |
KuduTableAlterer* kudu::client::KuduTableAlterer::RenameTo | +( | +const std::string & | +new_name | ) | ++ |
Rename the table.
+[in] | new_name | The new name for the table. |
KuduTableAlterer* kudu::client::KuduTableAlterer::SetComment | +( | +const std::string & | +new_comment | ) | ++ |
Set the comment on the table.
+[in] | new_comment | The new comment on the table. |
KuduTableAlterer* kudu::client::KuduTableAlterer::SetOwner | +( | +const std::string & | +new_owner | ) | ++ |
Set the owner of the table.
+[in] | new_owner | The new owner for the table. |
KuduTableAlterer* kudu::client::KuduTableAlterer::SetTableDiskSizeLimit | +( | +int64_t | +disk_size_limit | ) | ++ |
Set the disk size limit of the table by the super user.
+[in] | disk_size_limit | The max table disk size, -1 is for no limit |
KuduTableAlterer* kudu::client::KuduTableAlterer::SetTableRowCountLimit | +( | +int64_t | +row_count_limit | ) | ++ |
Set the row count limit of the table by the super user.
+[in] | row_count_limit | The max row count of the table, -1 is for no limit |
KuduTableAlterer* kudu::client::KuduTableAlterer::timeout | +( | +const MonoDelta & | +timeout | ) | ++ |
Set a timeout for the alteration operation.
+This includes any waiting after the alter has been submitted (i.e. if the alter is slow to be performed on a large table, it may time out and then later be successful).
+[in] | timeout | Timeout to set. |
KuduTableAlterer* kudu::client::KuduTableAlterer::wait | +( | +bool | +wait | ) | ++ |
Whether to wait for completion of alteration operations.
+If set to true
, an alteration operation returns control only after the operation is complete. Otherwise, every operation returns immediately. By default (i.e. when an alteration object is created) it is set to true
.
[in] | wait | Whether to wait for alteration operation to complete before returning control. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduTableCreator, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A helper class to create a new table with the desired options. + More...
+ +#include <client.h>
+Public Types | |
enum | RangePartitionBound { EXCLUSIVE_BOUND +, INCLUSIVE_BOUND + } |
Range partition bound type. More... | |
+Public Member Functions | |
KuduTableCreator & | table_name (const std::string &name) |
KuduTableCreator & | schema (const KuduSchema *schema) |
KuduTableCreator & | add_hash_partitions (const std::vector< std::string > &columns, int32_t num_buckets) |
KuduTableCreator & | add_hash_partitions (const std::vector< std::string > &columns, int32_t num_buckets, int32_t seed) |
KuduTableCreator & | set_range_partition_columns (const std::vector< std::string > &columns) |
KuduTableCreator & | add_range_partition (KuduPartialRow *lower_bound, KuduPartialRow *upper_bound, RangePartitionBound lower_bound_type=INCLUSIVE_BOUND, RangePartitionBound upper_bound_type=EXCLUSIVE_BOUND) |
KuduTableCreator & | add_custom_range_partition (class KuduRangePartition *partition) |
KuduTableCreator & | add_range_partition_split (KuduPartialRow *split_row) |
KuduTableCreator & | set_owner (const std::string &owner) |
KuduTableCreator & | set_comment (const std::string &comment) |
KuduTableCreator & | split_rows (const std::vector< const KuduPartialRow * > &split_rows) |
KuduTableCreator & | num_replicas (int n_replicas) |
KuduTableCreator & | dimension_label (const std::string &dimension_label) |
KuduTableCreator & | extra_configs (const std::map< std::string, std::string > &extra_configs) |
KuduTableCreator & | timeout (const MonoDelta &timeout) |
KuduTableCreator & | wait (bool wait) |
Status | Create () |
A helper class to create a new table with the desired options.
+enum kudu::client::KuduTableCreator::RangePartitionBound | +
KuduTableCreator& kudu::client::KuduTableCreator::add_custom_range_partition | +( | +class KuduRangePartition * | +partition | ) | ++ |
Add a range partition with a custom hash schema.
+This method allows adding a range partition which has hash partitioning schema different from the table-wide one.
+KuduRangePartition
for which KuduRangePartition::add_hash_partitions()
hasn't been called, a range with no hash sub-partitioning is created. KuduTableCreator::add_range_partition()
instead.[in] | partition | Range partition with range-specific hash schema. The KuduTableCreator object takes ownership of the partition object. |
KuduTableCreator& kudu::client::KuduTableCreator::add_hash_partitions | +( | +const std::vector< std::string > & | +columns, | +
+ | + | int32_t | +num_buckets | +
+ | ) | ++ |
Add a set of hash partitions to the table.
+Tables must be created with either range, hash, or range and hash partitioning.
+For each set of hash partitions added to the table, the total number of tablets is multiplied by the number of buckets. For example, if a table is created with 3 split rows, and 2 hash partitions with 4 and 5 buckets respectively, the total number of tablets will be 80 (4 range partitions * 4 hash buckets * 5 hash buckets).
+[in] | columns | Names of columns to use for partitioning. |
[in] | num_buckets | Number of buckets for the hashing. |
KuduTableCreator& kudu::client::KuduTableCreator::add_hash_partitions | +( | +const std::vector< std::string > & | +columns, | +
+ | + | int32_t | +num_buckets, | +
+ | + | int32_t | +seed | +
+ | ) | ++ |
Add a set of hash partitions to the table (with seed).
+This method is exactly the same as add_hash_partitions() above, with the exception of additional seed value, which can be used to randomize the mapping of rows to hash buckets. Setting the seed may provide some amount of protection against denial of service attacks when the hashed columns contain user provided values.
+[in] | columns | Names of columns to use for partitioning. |
[in] | num_buckets | Number of buckets for the hashing. |
[in] | seed | Hash: seed for mapping rows to hash buckets. |
KuduTableCreator& kudu::client::KuduTableCreator::add_range_partition | +( | +KuduPartialRow * | +lower_bound, | +
+ | + | KuduPartialRow * | +upper_bound, | +
+ | + | RangePartitionBound | +lower_bound_type = INCLUSIVE_BOUND , |
+
+ | + | RangePartitionBound | +upper_bound_type = EXCLUSIVE_BOUND |
+
+ | ) | ++ |
Add a range partition with table-wide hash bucket schema.
+Multiple range partitions may be added, but they must not overlap. All range splits specified by add_range_partition_split
must fall in a range partition. The lower bound must be less than or equal to the upper bound.
If this method is not called, the table's range will be unbounded.
+[in] | lower_bound | Row to use as a lower bound. The KuduTableCreator instance takes ownership of this parameter. If row is empty, no lower bound is imposed on the table range. If a column of the lower_bound row is missing a value, the logical minimum value for that column type is used as the default. |
[in] | upper_bound | Row to use as an upper bound. The KuduTableCreator instance takes ownership of this parameter. If row is empty, no upper bound is imposed on the table range. If a column of the upper_bound row is missing a value, the logical maximum value for that column type is used as the default. |
[in] | lower_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to inclusive. |
[in] | upper_bound_type | The type of the lower bound, either inclusive or exclusive. Defaults to exclusive. |
KuduTableCreator& kudu::client::KuduTableCreator::add_range_partition_split | +( | +KuduPartialRow * | +split_row | ) | ++ |
Add a range partition split at the provided row.
+[in] | split_row | The row to use for partitioning. If the row is missing a value for any of the range partition columns, the logical minimum value for that column type will be used by default. The KuduTableCreator object takes ownership of the parameter. |
Status kudu::client::KuduTableCreator::Create | +( | +) | ++ |
Create a table in accordance with parameters currently set for the KuduTableCreator instance. Once created, the table handle can be obtained using KuduClient::OpenTable() method.
+CREATE TABLE
operation. The return value may indicate an error in the create table operation, or a misuse of the builder. In the latter case, only the last error is returned. KuduTableCreator& kudu::client::KuduTableCreator::dimension_label | +( | +const std::string & | +dimension_label | ) | ++ |
Set the dimension label for all tablets created at table creation time.
+[in] | dimension_label | The dimension label for the tablet to be created. |
KuduTableCreator& kudu::client::KuduTableCreator::extra_configs | +( | +const std::map< std::string, std::string > & | +extra_configs | ) | ++ |
Sets the table's extra configuration properties.
+If the value of the kv pair is empty, the property will be ignored.
+[in] | extra_configs | The table's extra configuration properties. |
KuduTableCreator& kudu::client::KuduTableCreator::num_replicas | +( | +int | +n_replicas | ) | ++ |
Set the table replication factor.
+Replicated tables can continue to read and write data while a majority of replicas are not failed.
+[in] | n_replicas | Number of replicas to set. This should be an odd number. If not provided (or if <= 0), falls back to the server-side default. |
KuduTableCreator& kudu::client::KuduTableCreator::schema | +( | +const KuduSchema * | +schema | ) | ++ |
Set the schema with which to create the table.
+[in] | schema | Schema to use. Must remain valid for the lifetime of the builder. Must be non-NULL. |
KuduTableCreator& kudu::client::KuduTableCreator::set_comment | +( | +const std::string & | +comment | ) | ++ |
Set the table comment.
+[in] | comment | The comment on the table. |
KuduTableCreator& kudu::client::KuduTableCreator::set_owner | +( | +const std::string & | +owner | ) | ++ |
Set the table owner.
+If unspecified, the owner will be the user creating the table.
+[in] | owner | The username of the table owner. |
KuduTableCreator& kudu::client::KuduTableCreator::set_range_partition_columns | +( | +const std::vector< std::string > & | +columns | ) | ++ |
Set the columns on which the table will be range-partitioned.
+Tables must be created with either range, hash, or range and hash partitioning. To force the use of a single tablet (not recommended), call this method with an empty vector and set no split rows and no hash partitions.
+[in] | columns | Names of columns to use for partitioning. Every column must be a part of the table's primary key. If not set, or if called with an empty vector, the table will be created without range partitioning. |
KuduTableCreator& kudu::client::KuduTableCreator::split_rows | +( | +const std::vector< const KuduPartialRow * > & | +split_rows | ) | ++ |
add_range_partition_split()
instead.[in] | split_rows | The row to use for partitioning. |
KuduTableCreator& kudu::client::KuduTableCreator::table_name | +( | +const std::string & | +name | ) | ++ |
Set name for the table.
+[in] | name | Name of the target table. |
KuduTableCreator& kudu::client::KuduTableCreator::timeout | +( | +const MonoDelta & | +timeout | ) | ++ |
Set the timeout for the table creation operation.
+This includes any waiting after the create has been submitted (i.e. if the create is slow to be performed for a large table, it may time out and then later be successful).
+[in] | timeout | Timeout to set. |
KuduTableCreator& kudu::client::KuduTableCreator::wait | +( | +bool | +wait | ) | ++ |
Wait for the table to be fully created before returning.
+If not called, defaults to true
.
[in] | wait | Whether to wait for completion of operations. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduTableStatistics, including all inherited members.
+KuduTableStatistics() (defined in kudu::client::KuduTableStatistics) | kudu::client::KuduTableStatistics | |
live_row_count() const | kudu::client::KuduTableStatistics | |
live_row_count_limit() const | kudu::client::KuduTableStatistics | |
on_disk_size() const | kudu::client::KuduTableStatistics | |
on_disk_size_limit() const | kudu::client::KuduTableStatistics | |
ToString() const | kudu::client::KuduTableStatistics | |
~KuduTableStatistics() (defined in kudu::client::KuduTableStatistics) | kudu::client::KuduTableStatistics |
+ Kudu C++ client API
+
+ |
+
In-memory statistics of table. + More...
+ +#include <client.h>
+Public Member Functions | |
int64_t | on_disk_size () const |
int64_t | live_row_count () const |
int64_t | on_disk_size_limit () const |
int64_t | live_row_count_limit () const |
std::string | ToString () const |
In-memory statistics of table.
+int64_t kudu::client::KuduTableStatistics::live_row_count | +( | +) | +const | +
int64_t kudu::client::KuduTableStatistics::live_row_count_limit | +( | +) | +const | +
int64_t kudu::client::KuduTableStatistics::on_disk_size | +( | +) | +const | +
int64_t kudu::client::KuduTableStatistics::on_disk_size_limit | +( | +) | +const | +
std::string kudu::client::KuduTableStatistics::ToString | +( | +) | +const | +
Stringify this Statistics.
+
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduTablet, including all inherited members.
+id() const | kudu::client::KuduTablet | |
replicas() const | kudu::client::KuduTablet | |
~KuduTablet() (defined in kudu::client::KuduTablet) | kudu::client::KuduTablet |
+ Kudu C++ client API
+
+ |
+
In-memory representation of a remote tablet. + More...
+ +#include <client.h>
+Public Member Functions | |
const std::string & | id () const |
const std::vector< const KuduReplica * > & | replicas () const |
In-memory representation of a remote tablet.
+const std::string& kudu::client::KuduTablet::id | +( | +) | +const | +
const std::vector<const KuduReplica*>& kudu::client::KuduTablet::replicas | +( | +) | +const | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduTabletServer, including all inherited members.
+hostname() const | kudu::client::KuduTabletServer | |
port() const | kudu::client::KuduTabletServer | |
uuid() const | kudu::client::KuduTabletServer | |
~KuduTabletServer() (defined in kudu::client::KuduTabletServer) | kudu::client::KuduTabletServer |
+ Kudu C++ client API
+
+ |
+
In-memory representation of a remote tablet server. + More...
+ +#include <client.h>
+Public Member Functions | |
const std::string & | uuid () const |
const std::string & | hostname () const |
uint16_t | port () const |
In-memory representation of a remote tablet server.
+const std::string& kudu::client::KuduTabletServer::hostname | +( | +) | +const | +
uint16_t kudu::client::KuduTabletServer::port | +( | +) | +const | +
const std::string& kudu::client::KuduTabletServer::uuid | +( | +) | +const | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduTransaction, including all inherited members.
+Commit() WARN_UNUSED_RESULT | kudu::client::KuduTransaction | |
CreateSession(sp::shared_ptr< KuduSession > *session) WARN_UNUSED_RESULT | kudu::client::KuduTransaction | |
Deserialize(const sp::shared_ptr< KuduClient > &client, const std::string &serialized_txn, sp::shared_ptr< KuduTransaction > *txn) WARN_UNUSED_RESULT | kudu::client::KuduTransaction | static |
IsCommitComplete(bool *is_complete, Status *completion_status) WARN_UNUSED_RESULT | kudu::client::KuduTransaction | |
Rollback() WARN_UNUSED_RESULT | kudu::client::KuduTransaction | |
Serialize(std::string *serialized_txn, const SerializationOptions &options=SerializationOptions()) const WARN_UNUSED_RESULT | kudu::client::KuduTransaction | |
StartCommit() WARN_UNUSED_RESULT | kudu::client::KuduTransaction | |
~KuduTransaction() (defined in kudu::client::KuduTransaction) | kudu::client::KuduTransaction |
+ Kudu C++ client API
+
+ |
+
#include <client.h>
+Classes | |
class | SerializationOptions |
+Public Member Functions | |
Status | CreateSession (sp::shared_ptr< KuduSession > *session) WARN_UNUSED_RESULT |
Status | Commit () WARN_UNUSED_RESULT |
Status | StartCommit () WARN_UNUSED_RESULT |
Status | IsCommitComplete (bool *is_complete, Status *completion_status) WARN_UNUSED_RESULT |
Status | Rollback () WARN_UNUSED_RESULT |
Status | Serialize (std::string *serialized_txn, const SerializationOptions &options=SerializationOptions()) const WARN_UNUSED_RESULT |
+Static Public Member Functions | |
static Status | Deserialize (const sp::shared_ptr< KuduClient > &client, const std::string &serialized_txn, sp::shared_ptr< KuduTransaction > *txn) WARN_UNUSED_RESULT |
A class representing a multi-row transaction in Kudu. Once created using KuduClient::BeginTransaction()
or KuduTransaction::Deserialize
method, KuduTransaction
instance can be used to commit or rollback the underlying multi-row transaction and create a transactional session.
KuduTransaction
should be kept in scope to maintain automatic keep-alive heartbeating for the corresponding transaction. Once this object goes out of scope, the heartbeating stops and the transaction may automatically be aborted soon if no other clients do the heartbeating.Status kudu::client::KuduTransaction::Commit | +( | +) | ++ |
Commit the transaction.
+This method automatically flushes all transactional sessions created off this transaction handle via KuduTransaction::CreateSession()
, initiates committing the transaction, and then waits for the commit phase to finalize. The flushing of all the derivative transactional sessions helps avoiding unintentional data loss when those sessions are not flushed explicitly before committing. No new operations should be pushed into the derivative transactional sessions created off this handle once the method has been called.
Status::OK()
if all the stages of the transaction's commit sequence were successful, i.e. the status of various pre-commit work, the status of starting the commit phase, the status of the commit phase itself once it's completed. Returns non-OK status of the very first failed stage of the transaction's commit sequence. Status kudu::client::KuduTransaction::CreateSession | +( | +sp::shared_ptr< KuduSession > * | +session | ) | ++ |
Create a new KuduSession
with "transactional" semantics.
Every write operation performed in the context of the newly created "transactional" session becomes a part of the corresponding multi-row transaction represented by an instance of this class. Multiple sessions can be created in the context of the same multi-row distributed transaction by the same or different Kudu clients residing on a single or multiple nodes.
+[out] | session | The result session object. |
+
|
+ +static | +
Re-create KuduTransaction object given its serialized representation.
+This method doesn't perform any RPC under the hood. The newly created object automatically does or does not send keep-alive messages depending on the KuduTransaction::SerializationOptions::enable_keepalive()
setting when the original KuduTransaction
object was serialized using KuduTransaction::Serialize()
.
[in] | client | Client instance to bound the result object to. |
[in] | serialized_txn | String containing serialized representation of KuduTransaction object. |
[out] | txn | The result KuduTransaction object, wrapped into a smart pointer. |
Status kudu::client::KuduTransaction::IsCommitComplete | +( | +bool * | +is_complete, | +
+ | + | Status * | +completion_status | +
+ | ) | ++ |
Whether the commit has completed i.e. no longer in progress of finalizing.
+This method checks for the transaction's commit status, setting the is_complete
out parameter to true
and the completion_status
parameter to the finalization status of the commit process, assuming the method returning Status::OK()
. The happy case is when the method returns Status::OK()
, is_complete
is set to true
and completion_status
is set to Status::OK()
– that means the transaction has successfully finalized its commit phase.
[out] | is_complete | Whether the process of finalizing the commit of the transaction has ended, including both success and failure outcomes. In other words, the value of this out parameter indicates whether the finalization of the transaction's commit phase is no longer in progress: it already succeeded or failed by the time of processing the request. This parameter is assigned a meaningful value iff the method returns Status::OK() . |
[out] | completion_status | The status of finalization of the transaction's commit phase:
|
is_complete
and completion_status
are set iff the method returns Status::OK()
. Status kudu::client::KuduTransaction::Rollback | +( | +) | ++ |
Rollback/abort the transaction.
+Status kudu::client::KuduTransaction::Serialize | +( | +std::string * | +serialized_txn, | +
+ | + | const SerializationOptions & | +options = SerializationOptions() |
+
+ | ) | +const | +
Export the information on this transaction in a serialized form.
+The serialized information on a Kudu transaction can be passed among different Kudu clients running at multiple nodes, so those separate Kudu clients can perform operations to be a part of the same distributed transaction. The resulting string is referred as "transaction token" and can be deserialized into a transaction handle (i.e. an object of the KuduTransaction
class) via the KuduTransaction::Deserialize()
method.
This method doesn't perform any RPC under the hood. The behavior of this method is controlled by SerializationOptions
set for this transaction handle.
[out] | serialized_txn | Result string to output the serialized transaction information. |
[in] | options | Options to use when serializing the handle (optional). If omitted, the default serialization parameters are used – the same as it would be for a default-constructed instance of SerializationOptions used for this parameter. |
Status kudu::client::KuduTransaction::StartCommit | +( | +) | ++ |
Start committing this transaction, but don't wait for the commit phase to finalize.
+This method initiates the commit phase for this transaction, not waiting for the commit phase to finalize. It requires all the transactional sessions created off this handle via KuduTransaction::CreateSession()
to be flushed already. No new operations should be pushed into the derivative transactional sessions created off this handle once the method has been called. To check for the transaction's commit status, use the KuduTransaction::IsCommitComplete()
method.
Status::IllegalState()
.
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduTransaction::SerializationOptions, including all inherited members.
+enable_keepalive(bool enable) | kudu::client::KuduTransaction::SerializationOptions | |
keepalive() const | kudu::client::KuduTransaction::SerializationOptions | |
SerializationOptions() (defined in kudu::client::KuduTransaction::SerializationOptions) | kudu::client::KuduTransaction::SerializationOptions | |
~SerializationOptions() (defined in kudu::client::KuduTransaction::SerializationOptions) | kudu::client::KuduTransaction::SerializationOptions |
+ Kudu C++ client API
+
+ |
+
#include <client.h>
+Public Member Functions | |
bool | keepalive () const |
SerializationOptions & | enable_keepalive (bool enable) |
This class controls serialization-related parameters for a Kudu transaction handle (i.e. KuduTransaction
).
One of the parameters is whether to enable sending keepalive messages for the resulting KuduTransaction
handle upon deserialization. In future, the list of configurable parameters might be extended (e.g., by adding commit and abort permissions, i.e. whether a handle obtained by deserializing a handle from the string representation can be used to commit and/or abort the transaction).
SerializationOptions& kudu::client::KuduTransaction::SerializationOptions::enable_keepalive | +( | +bool | +enable | ) | ++ |
Enable/disable keepalive for a handle which is the result of deserializing a previously serialized KuduTransaction
handle.
Sending keepalive messages for a transaction handle deserialized from a string is disabled by default.
+[in] | enable | Whether to enable sending keepalive messages for KuduTransaction handle once it's deserialized from the string representation of a Kudu transaction handle. |
bool kudu::client::KuduTransaction::SerializationOptions::keepalive | +( | +) | +const | +
This method returns the current setting keepalive behavior, i.e. whether to send keepalive messages for Kudu transaction handles.
+No keepalive heartbeat messages are sent from a transaction handle if its token was created with the default "keepalive disabled" setting. The idea here is that the most common use case for using transaction tokens is of the "start topology" (see below), so it's enough to have just one top-level handle sending keepalive messages. Overall, having more than one actor sending keepalive messages for a transaction is acceptable but it puts needless load on a cluster.
+The most common use case for a transaction's handle serialization/deserialization is of the "star topology": a transaction is started by a top-level application which sends the transaction token produced by serializing the original transaction handle to other worker applications running concurrently, where the latter write their data in the context of the same transaction and report back to the top-level application, which in its turn initiates committing the transaction as needed. The important point is that the top-level application keeps the transaction handle around all the time from the start of the transaction to the very point when transaction is committed. Under the hood, the original transaction handle sends keepalive messages as required until commit phase is initiated, so the deserialized transaction handles which are used by the worker applications don't need to send keepalive messages.
+The other (less common) use case is of the "ring topology": a chain of applications work sequentially as a part of the same transaction, where the very first application starts the transaction, writes its data, and hands over the responsibility of managing the lifecycle of the transaction to other application down the chain. After doing so it may exit, so now only the next application has the active transaction handle, and so on it goes until the transaction is committed by the application in the end of the chain. In this scenario, every deserialized handle have to send keepalive messages to avoid automatic rollback of the transaction, and every application in the chain should set SerializationOptions::enable_keepalive
to true when serializing its transaction handle into a transaction token to pass to the application next in the chain.
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduUpdate, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A single row update to be sent to the cluster. + More...
+ +#include <write_op.h>
+Public Member Functions | |
virtual std::string | ToString () const OVERRIDE |
Public Member Functions inherited from kudu::client::KuduWriteOperation | |
const KuduPartialRow & | row () const |
KuduPartialRow * | mutable_row () |
const KuduTable * | table () const |
+Additional Inherited Members | |
Public Types inherited from kudu::client::KuduWriteOperation | |
enum | Type { + INSERT = 1 +, UPDATE = 2 +, DELETE = 3 +, UPSERT = 4 +, + INSERT_IGNORE = 5 +, UPDATE_IGNORE = 6 +, DELETE_IGNORE = 7 +, UPSERT_IGNORE = 8 + + } |
Write operation types. | |
A single row update to be sent to the cluster.
+
+
|
+ +inlinevirtual | +
Implements kudu::client::KuduWriteOperation.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduUpdateIgnore, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A single row update ignore to be sent to the cluster, missing row errors and errors on updating immutable cells are ignored. + More...
+ +#include <write_op.h>
+Public Member Functions | |
virtual std::string | ToString () const OVERRIDE |
Public Member Functions inherited from kudu::client::KuduWriteOperation | |
const KuduPartialRow & | row () const |
KuduPartialRow * | mutable_row () |
const KuduTable * | table () const |
+Additional Inherited Members | |
Public Types inherited from kudu::client::KuduWriteOperation | |
enum | Type { + INSERT = 1 +, UPDATE = 2 +, DELETE = 3 +, UPSERT = 4 +, + INSERT_IGNORE = 5 +, UPDATE_IGNORE = 6 +, DELETE_IGNORE = 7 +, UPSERT_IGNORE = 8 + + } |
Write operation types. | |
A single row update ignore to be sent to the cluster, missing row errors and errors on updating immutable cells are ignored.
+
+
|
+ +inlinevirtual | +
Implements kudu::client::KuduWriteOperation.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduUpsert, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A single row upsert to be sent to the cluster. + More...
+ +#include <write_op.h>
+Public Member Functions | |
virtual std::string | ToString () const OVERRIDE |
Public Member Functions inherited from kudu::client::KuduWriteOperation | |
const KuduPartialRow & | row () const |
KuduPartialRow * | mutable_row () |
const KuduTable * | table () const |
+Additional Inherited Members | |
Public Types inherited from kudu::client::KuduWriteOperation | |
enum | Type { + INSERT = 1 +, UPDATE = 2 +, DELETE = 3 +, UPSERT = 4 +, + INSERT_IGNORE = 5 +, UPDATE_IGNORE = 6 +, DELETE_IGNORE = 7 +, UPSERT_IGNORE = 8 + + } |
Write operation types. | |
A single row upsert to be sent to the cluster.
+See KuduInsert for more details.
+
+
|
+ +inlinevirtual | +
Implements kudu::client::KuduWriteOperation.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduUpsertIgnore, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A single row upsert ignore to be sent to the cluster, errors on updating immutable cells are ignored. + More...
+ +#include <write_op.h>
+Public Member Functions | |
std::string | ToString () const OVERRIDE |
Public Member Functions inherited from kudu::client::KuduWriteOperation | |
const KuduPartialRow & | row () const |
KuduPartialRow * | mutable_row () |
const KuduTable * | table () const |
+Additional Inherited Members | |
Public Types inherited from kudu::client::KuduWriteOperation | |
enum | Type { + INSERT = 1 +, UPDATE = 2 +, DELETE = 3 +, UPSERT = 4 +, + INSERT_IGNORE = 5 +, UPDATE_IGNORE = 6 +, DELETE_IGNORE = 7 +, UPSERT_IGNORE = 8 + + } |
Write operation types. | |
A single row upsert ignore to be sent to the cluster, errors on updating immutable cells are ignored.
+See KuduUpsert for more details.
+
+
|
+ +inlinevirtual | +
Implements kudu::client::KuduWriteOperation.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduValue, including all inherited members.
+Clone() const | kudu::client::KuduValue | |
CopyString(Slice s) | kudu::client::KuduValue | static |
FromBool(bool val) | kudu::client::KuduValue | static |
FromDouble(double val) | kudu::client::KuduValue | static |
FromFloat(float val) | kudu::client::KuduValue | static |
FromInt(int64_t val) | kudu::client::KuduValue | static |
~KuduValue() (defined in kudu::client::KuduValue) | kudu::client::KuduValue |
+ Kudu C++ client API
+
+ |
+
A constant cell value with a specific type. + More...
+ +#include <value.h>
+Public Member Functions | |
KuduValue * | Clone () const |
+Static Public Member Functions | |
static KuduValue * | CopyString (Slice s) |
Builders from integral types. | |
static KuduValue * | FromInt (int64_t val) |
static KuduValue * | FromFloat (float val) |
static KuduValue * | FromDouble (double val) |
static KuduValue * | FromBool (bool val) |
A constant cell value with a specific type.
+KuduValue* kudu::client::KuduValue::Clone | +( | +) | +const | +
+
|
+ +static | +
+
|
+ +static | +
+
|
+ +static | +
+
|
+ +static | +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::KuduWriteOperation, including all inherited members.
+
+ Kudu C++ client API
+
+ |
+
A single-row write operation to be sent to a Kudu table. + More...
+ +#include <write_op.h>
+Public Types | |
enum | Type { + INSERT = 1 +, UPDATE = 2 +, DELETE = 3 +, UPSERT = 4 +, + INSERT_IGNORE = 5 +, UPDATE_IGNORE = 6 +, DELETE_IGNORE = 7 +, UPSERT_IGNORE = 8 + + } |
Write operation types. | |
+Public Member Functions | |
const KuduPartialRow & | row () const |
KuduPartialRow * | mutable_row () |
virtual std::string | ToString () const =0 |
const KuduTable * | table () const |
A single-row write operation to be sent to a Kudu table.
+This is the abstract base class from which the particular row operations (KuduInsert, KuduUpdate, etc) are derived. These subclasses are instantiated by KuduTable::NewInsert(), etc.
+The row key, as well as the columns to be inserted or updated are set using the embedded KuduPartialRow object accessible via mutable_row().
+Typical usage example:
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +pure virtual | +
Implemented in kudu::client::KuduDeleteIgnore, kudu::client::KuduDelete, kudu::client::KuduUpdateIgnore, kudu::client::KuduUpdate, kudu::client::KuduUpsertIgnore, kudu::client::KuduUpsert, kudu::client::KuduInsertIgnore, and kudu::client::KuduInsert.
+ +
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::client::ResourceMetrics, including all inherited members.
+Get() const | kudu::client::ResourceMetrics | |
GetMetric(const std::string &name) const | kudu::client::ResourceMetrics | |
Increment(const std::string &name, int64_t amount) | kudu::client::ResourceMetrics | |
ResourceMetrics() (defined in kudu::client::ResourceMetrics) | kudu::client::ResourceMetrics | |
~ResourceMetrics() (defined in kudu::client::ResourceMetrics) | kudu::client::ResourceMetrics |
+ Kudu C++ client API
+
+ |
+
A generic catalog of simple metrics. + More...
+ +#include <resource_metrics.h>
+Public Member Functions | |
std::map< std::string, int64_t > | Get () const |
void | Increment (const std::string &name, int64_t amount) |
int64_t | GetMetric (const std::string &name) const |
A generic catalog of simple metrics.
+std::map<std::string, int64_t> kudu::client::ResourceMetrics::Get | +( | +) | +const | +
int64_t kudu::client::ResourceMetrics::GetMetric | +( | +const std::string & | +name | ) | +const | +
Get current count for the specified metric.
+[in] | name | Name of the metric in question. |
void kudu::client::ResourceMetrics::Increment | +( | +const std::string & | +name, | +
+ | + | int64_t | +amount | +
+ | ) | ++ |
Increment/decrement the given metric.
+[in] | name | The name of the metric. |
[in] | amount | The amount to increment the metric (negative amount corresponds to decrementing the metric). |
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::internal_logging::CerrLog, including all inherited members.
+CerrLog(int severity) | kudu::internal_logging::CerrLog | inline |
operator<<(const T &t) | kudu::internal_logging::CerrLog | inline |
~CerrLog() (defined in kudu::internal_logging::CerrLog) | kudu::internal_logging::CerrLog | inline |
+ Kudu C++ client API
+
+ |
+
A helper for stderr log sink. + More...
+ +#include <stubs.h>
+Public Member Functions | |
CerrLog (int severity) | |
template<class T > | |
CerrLog & | operator<< (const T &t) |
A helper for stderr log sink.
+
+
|
+ +inline | +
Create a CerrLog sink helper object.
+[in] | severity | The severity for log messages output to the sink (stderr). |
+
|
+ +inline | +
The output operator.
+[in] | t | The object to print into stderr. |
+ Kudu C++ client API
+
+ |
+
This is the complete list of members for kudu::internal_logging::NullLog, including all inherited members.
+operator<<(const T &t) | kudu::internal_logging::NullLog | inline |
+ Kudu C++ client API
+
+ |
+
A helper for the nil log sink. + More...
+ +#include <stubs.h>
+Public Member Functions | |
template<class T > | |
NullLog & | operator<< (const T &t) |
A helper for the nil log sink.
+Using this helper is analogous to sending log messages to /dev/null: nothing gets logged.
+
+
|
+ +inline | +
The no-op output operator.
+[in] | t | The object to send into the nil sink. |
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
add_range_partition_split()
instead. use
std::min() instead. kudu::operator-(const MonoTime&, const MonoTime&)
instead.
+ Kudu C++ client API
+
+ |
+
+Files | |
file | shared_ptr.h [code] |
Smart pointer typedefs for externally-faced code. | |
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
▼ include | |
▼ kudu | |
▼ client | |
callbacks.h | |
client.h | |
columnar_scan_batch.h | |
hash.h | |
resource_metrics.h | |
row_result.h | |
scan_batch.h | |
scan_predicate.h | |
schema.h | |
shared_ptr.h | Smart pointer typedefs for externally-faced code |
stubs.h | |
value.h | |
write_op.h | |
▼ common | |
partial_row.h | |
▼ util | |
int128.h | |
kudu_export.h | |
monotime.h | |
slice.h | |
status.h |
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+
Ckudu::client::internal::AsyncLeaderMasterRpc< ReqClass, RespClass > | |
Ckudu::client::internal::AsyncRandomTxnManagerRpc< ReqClass, RespClass > | |
Ckudu::internal_logging::CerrLog | A helper for stderr log sink |
Ckudu::Slice::Comparator | Comparator struct, useful for ordered collections (like STL maps) |
▼Cconst_iterator public std::iterator | |
Ckudu::client::KuduScanBatch | A batch of zero or more rows returned by a scan operation |
Ckudu::client::KuduBloomFilter | Bloom filter to be used with IN Bloom filter predicate |
Ckudu::client::KuduBloomFilterBuilder | Builder class to help build KuduBloomFilter to be used with IN Bloom filter predicate |
Ckudu::client::KuduClientBuilder | A "factory" for KuduClient objects |
Ckudu::client::KuduColumnarScanBatch | A batch of columnar data returned from a scanner |
Ckudu::client::KuduColumnSchema | Representation of the column schema |
Ckudu::client::KuduColumnSpec | Builder API for specifying or altering a column within a table schema |
Ckudu::client::KuduColumnStorageAttributes | Representation of column storage attributes |
Ckudu::client::KuduColumnTypeAttributes | Representation of column type attributes |
Ckudu::client::KuduError | This class represents an error which occurred in a write operation |
▼Ckudu::client::KuduLoggingCallback | The interface for all logging callbacks |
Ckudu::client::KuduLoggingFunctionCallback< T > | The logging callback that invokes a function by pointer with a single argument |
Ckudu::client::KuduLoggingMemberCallback< T > | The logging callback that invokes a member function of an object |
CKuduPartialRow | A row which may only contain values for a subset of the columns |
Ckudu::client::KuduPartitioner | |
Ckudu::client::KuduPartitionerBuilder | Builder for Partitioner instances |
Ckudu::client::KuduPredicate | A representation of comparison predicate for Kudu queries |
Ckudu::client::KuduRangePartition | |
Ckudu::client::KuduReplica | In-memory representation of a remote tablet's replica |
Ckudu::client::KuduScanner | This class is a representation of a single scan |
Ckudu::client::KuduScanToken | A scan descriptor limited to a single physical contiguous location |
Ckudu::client::KuduScanTokenBuilder | Builds scan tokens for a table |
Ckudu::client::KuduSchema | A representation of a table's schema |
Ckudu::client::KuduSchemaBuilder | Builder API for constructing a KuduSchema object |
▼Ckudu::client::KuduStatusCallback | The interface for all status callbacks |
Ckudu::client::KuduStatusFunctionCallback< T > | The status callback that invokes a function by pointer with a single argument |
Ckudu::client::KuduStatusMemberCallback< T > | The status callback that invokes a member function of an object |
Ckudu::client::KuduTableAlterer | Alters an existing table based on the provided steps |
Ckudu::client::KuduTableCreator | A helper class to create a new table with the desired options |
Ckudu::client::KuduTableStatistics | In-memory statistics of table |
Ckudu::client::KuduTablet | In-memory representation of a remote tablet |
Ckudu::client::KuduTabletServer | In-memory representation of a remote tablet server |
Ckudu::client::KuduValue | A constant cell value with a specific type |
▼Ckudu::client::KuduWriteOperation | A single-row write operation to be sent to a Kudu table |
Ckudu::client::KuduDelete | A single row delete to be sent to the cluster |
Ckudu::client::KuduDeleteIgnore | A single row delete ignore to be sent to the cluster |
Ckudu::client::KuduInsert | A single row insert to be sent to the cluster |
Ckudu::client::KuduInsertIgnore | A single row insert ignore to be sent to the cluster, duplicate row errors are ignored |
Ckudu::client::KuduUpdate | A single row update to be sent to the cluster |
Ckudu::client::KuduUpdateIgnore | A single row update ignore to be sent to the cluster, missing row errors and errors on updating immutable cells are ignored |
Ckudu::client::KuduUpsert | A single row upsert to be sent to the cluster |
Ckudu::client::KuduUpsertIgnore | A single row upsert ignore to be sent to the cluster, errors on updating immutable cells are ignored |
Ckudu::MonoDelta | A representation of a time interval |
Ckudu::MonoTime | Representation of a particular point in time |
Ckudu::internal_logging::NullLog | A helper for the nil log sink |
Ckudu::client::ResourceMetrics | A generic catalog of simple metrics |
▼CRowPtr | |
Ckudu::client::KuduScanBatch | A batch of zero or more rows returned by a scan operation |
Ckudu::client::KuduTransaction::SerializationOptions | |
Ckudu::Slice | A wrapper around externally allocated data |
Ckudu::SliceMap< T > | STL map whose keys are Slices |
Ckudu::Status | A representation of an operation's outcome |
▼Cenable_shared_from_this | |
Ckudu::client::KuduClient | A handle for a connection to a cluster |
Ckudu::client::KuduSession | Representation of a Kudu client session |
Ckudu::client::KuduTable | A representation of a table on a particular cluster |
Ckudu::client::KuduTransaction |
+ Kudu C++ client API
+
+ |
+
Kudu provides C++ and Java client APIs, as well as reference examples to illustrate their use (check the source code for the examples). This is Kudu C++ client API. Use of any APIs other than the client APIs is unsupported.
+
+ Kudu C++ client API
+
+ |
+
+ Kudu C++ client API
+
+ |
+