com.google.cloud.bigtable.hbase.adapters.read
Class ReaderExpressionHelper
- java.lang.Object
-
- com.google.cloud.bigtable.hbase.adapters.read.ReaderExpressionHelper
-
public class ReaderExpressionHelper extends Object
Methods and constants to help build a bigtable reader expression // TODO(AngusDavis): Move more ScanAdapter and FilterAdapter writing logic to here.- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
ReaderExpressionHelper.QuoteFilterExpressionStream
An OutputStream that performs bigtable reader filter expression language quoting of '@', '{', and '}' by pre-pending a '@' to each.static class
ReaderExpressionHelper.QuoteMetaOutputStream
An OutputStream that performs RE2:QuoteMeta as bytes are written.
-
Field Summary
Fields Modifier and Type Field and Description static byte[]
ALL_BYTE_BYTES
ConstantANY_BYTE_BYTES=Bytes.toBytes(ANY_BYTE)
static String
ALL_BYTES
ConstantALL_BYTES="\\C*"
static byte[]
ALL_QUALIFIERS_BYTES
ConstantALL_QUALIFIERS_BYTES=Bytes.toBytes(ALL_QUALIFIERS)
static String
ANY_BYTE
ConstantANY_BYTE="\\C"
static byte[]
ANY_BYTE_BYTES
ConstantANY_BYTE_BYTES=Bytes.toBytes(ANY_BYTE)
static String
ANY_BYTES
ConstantANY_BYTES="\\C+"
-
Constructor Summary
Constructors Constructor and Description ReaderExpressionHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static ByteString
quoteRegularExpression(byte[] unquoted)
quoteRegularExpression.static void
writeQuotedExpression(OutputStream outputStream, byte[] unquoted)
Write unquoted to the OutputStream applying both RE2:QuoteMeta and Bigtable reader expression quoting.static void
writeQuotedRegularExpression(OutputStream outputStream, byte[] unquoted)
Write unquoted to the OutputStream applying RE2:QuoteMeta quoting.
-
-
-
Field Detail
-
ANY_BYTE
public static final String ANY_BYTE
ConstantANY_BYTE="\\C"
- See Also:
- Constant Field Values
-
ANY_BYTES
public static final String ANY_BYTES
ConstantANY_BYTES="\\C+"
- See Also:
- Constant Field Values
-
ALL_BYTES
public static final String ALL_BYTES
ConstantALL_BYTES="\\C*"
- See Also:
- Constant Field Values
-
ANY_BYTE_BYTES
public static final byte[] ANY_BYTE_BYTES
ConstantANY_BYTE_BYTES=Bytes.toBytes(ANY_BYTE)
-
ALL_BYTE_BYTES
public static final byte[] ALL_BYTE_BYTES
ConstantANY_BYTE_BYTES=Bytes.toBytes(ANY_BYTE)
-
ALL_QUALIFIERS_BYTES
public static final byte[] ALL_QUALIFIERS_BYTES
ConstantALL_QUALIFIERS_BYTES=Bytes.toBytes(ALL_QUALIFIERS)
-
-
Method Detail
-
writeQuotedExpression
public static void writeQuotedExpression(OutputStream outputStream, byte[] unquoted) throws IOException
Write unquoted to the OutputStream applying both RE2:QuoteMeta and Bigtable reader expression quoting.- Parameters:
outputStream
- A stream to write quoted output tounquoted
- A byte-array, possibly containing bytes outside of the ASCII- Throws:
IOException
- if any.
-
quoteRegularExpression
public static ByteString quoteRegularExpression(byte[] unquoted) throws IOException
quoteRegularExpression.- Parameters:
unquoted
- an array of byte.- Returns:
- an array of byte.
- Throws:
IOException
- if any.
-
writeQuotedRegularExpression
public static void writeQuotedRegularExpression(OutputStream outputStream, byte[] unquoted) throws IOException
Write unquoted to the OutputStream applying RE2:QuoteMeta quoting.- Parameters:
outputStream
- aOutputStream
object.unquoted
- an array of byte.- Throws:
IOException
- if any.
-
-