本文整理了Java中org.apache.hadoop.hbase.client.Put.checkRow()
方法的一些代码示例,展示了Put.checkRow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Put.checkRow()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Put
类名称:Put
方法名:checkRow
暂无
代码示例来源:origin: apache/hbase
/**
* @param row row key; we make a copy of what we are passed to keep local.
* @param ts timestamp
*/
public Put(ByteBuffer row, long ts) {
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
checkRow(row);
this.row = new byte[row.remaining()];
row.get(this.row);
this.ts = ts;
}
代码示例来源:origin: apache/hbase
/**
* We make a copy of the passed in row key to keep local.
* @param rowArray
* @param rowOffset
* @param rowLength
* @param ts
*/
public Put(byte [] rowArray, int rowOffset, int rowLength, long ts) {
checkRow(rowArray, rowOffset, rowLength);
this.row = Bytes.copy(rowArray, rowOffset, rowLength);
this.ts = ts;
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
}
代码示例来源:origin: apache/hbase
/**
* Create a Put operation for an immutable row key, using a given timestamp.
*
* @param row row key
* @param ts timestamp
* @param rowIsImmutable whether the input row is immutable.
* Set to true if the caller can guarantee that
* the row will not be changed for the Put duration.
*/
public Put(byte[] row, long ts, boolean rowIsImmutable) {
// Check and set timestamp
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
this.ts = ts;
// Deal with row according to rowIsImmutable
checkRow(row);
if (rowIsImmutable) { // Row is immutable
this.row = row; // Do not make a local copy, but point to the provided byte array directly
} else { // Row is not immutable
this.row = Bytes.copy(row, 0, row.length); // Make a local copy
}
}
代码示例来源:origin: org.apache.hbase/hbase-client
/**
* @param row row key; we make a copy of what we are passed to keep local.
* @param ts timestamp
*/
public Put(ByteBuffer row, long ts) {
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
checkRow(row);
this.row = new byte[row.remaining()];
row.get(this.row);
this.ts = ts;
}
代码示例来源:origin: org.apache.hbase/hbase-client
/**
* We make a copy of the passed in row key to keep local.
* @param rowArray
* @param rowOffset
* @param rowLength
* @param ts
*/
public Put(byte [] rowArray, int rowOffset, int rowLength, long ts) {
checkRow(rowArray, rowOffset, rowLength);
this.row = Bytes.copy(rowArray, rowOffset, rowLength);
this.ts = ts;
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
}
代码示例来源:origin: org.apache.hbase/hbase-client
/**
* Create a Put operation for an immutable row key, using a given timestamp.
*
* @param row row key
* @param ts timestamp
* @param rowIsImmutable whether the input row is immutable.
* Set to true if the caller can guarantee that
* the row will not be changed for the Put duration.
*/
public Put(byte[] row, long ts, boolean rowIsImmutable) {
// Check and set timestamp
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
this.ts = ts;
// Deal with row according to rowIsImmutable
checkRow(row);
if (rowIsImmutable) { // Row is immutable
this.row = row; // Do not make a local copy, but point to the provided byte array directly
} else { // Row is not immutable
this.row = Bytes.copy(row, 0, row.length); // Make a local copy
}
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
/**
* @param row row key; we make a copy of what we are passed to keep local.
* @param ts timestamp
*/
public Put(ByteBuffer row, long ts) {
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
checkRow(row);
this.row = new byte[row.remaining()];
row.get(this.row);
this.ts = ts;
}
代码示例来源:origin: harbby/presto-connectors
/**
* @param row row key; we make a copy of what we are passed to keep local.
* @param ts timestamp
*/
public Put(ByteBuffer row, long ts) {
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
checkRow(row);
this.row = new byte[row.remaining()];
row.get(this.row);
this.ts = ts;
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
/**
* We make a copy of the passed in row key to keep local.
* @param rowArray
* @param rowOffset
* @param rowLength
* @param ts
*/
public Put(byte [] rowArray, int rowOffset, int rowLength, long ts) {
checkRow(rowArray, rowOffset, rowLength);
this.row = Bytes.copy(rowArray, rowOffset, rowLength);
this.ts = ts;
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
}
代码示例来源:origin: harbby/presto-connectors
/**
* We make a copy of the passed in row key to keep local.
* @param rowArray
* @param rowOffset
* @param rowLength
* @param ts
*/
public Put(byte [] rowArray, int rowOffset, int rowLength, long ts) {
checkRow(rowArray, rowOffset, rowLength);
this.row = Bytes.copy(rowArray, rowOffset, rowLength);
this.ts = ts;
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
}
代码示例来源:origin: com.aliyun.hbase/alihbase-client
/**
* Create a Put operation for an immutable row key, using a given timestamp.
*
* @param row row key
* @param ts timestamp
* @param rowIsImmutable whether the input row is immutable.
* Set to true if the caller can guarantee that
* the row will not be changed for the Put duration.
*/
public Put(byte[] row, long ts, boolean rowIsImmutable) {
// Check and set timestamp
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
this.ts = ts;
// Deal with row according to rowIsImmutable
checkRow(row);
if (rowIsImmutable) { // Row is immutable
this.row = row; // Do not make a local copy, but point to the provided byte array directly
} else { // Row is not immutable
this.row = Bytes.copy(row, 0, row.length); // Make a local copy
}
}
内容来源于网络,如有侵权,请联系作者删除!