當前位置: 首頁>>代碼示例>>Java>>正文


Java HColumnDescriptor.DEFAULT_VERSIONS屬性代碼示例

本文整理匯總了Java中org.apache.hadoop.hbase.HColumnDescriptor.DEFAULT_VERSIONS屬性的典型用法代碼示例。如果您正苦於以下問題:Java HColumnDescriptor.DEFAULT_VERSIONS屬性的具體用法?Java HColumnDescriptor.DEFAULT_VERSIONS怎麽用?Java HColumnDescriptor.DEFAULT_VERSIONS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.apache.hadoop.hbase.HColumnDescriptor的用法示例。


在下文中一共展示了HColumnDescriptor.DEFAULT_VERSIONS屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testForceSplit

/**
 * Tests forcing split from client and having scanners successfully ride over split.
 * @throws Exception
 * @throws IOException
 */
@Test (timeout=400000)
public void testForceSplit() throws Exception {
  byte[][] familyNames = new byte[][] { Bytes.toBytes("cf") };
  int[] rowCounts = new int[] { 6000 };
  int numVersions = HColumnDescriptor.DEFAULT_VERSIONS;
  int blockSize = 256;
  splitTest(null, familyNames, rowCounts, numVersions, blockSize);

  byte[] splitKey = Bytes.toBytes(3500);
  splitTest(splitKey, familyNames, rowCounts, numVersions, blockSize);
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:16,代碼來源:TestAdmin1.java

示例2: testForceSplitMultiFamily

/**
 * Multi-family scenario. Tests forcing split from client and
 * having scanners successfully ride over split.
 * @throws Exception
 * @throws IOException
 */
@Test (timeout=800000)
public void testForceSplitMultiFamily() throws Exception {
  int numVersions = HColumnDescriptor.DEFAULT_VERSIONS;

  // use small HFile block size so that we can have lots of blocks in HFile
  // Otherwise, if there is only one block,
  // HFileBlockIndex.midKey()'s value == startKey
  int blockSize = 256;
  byte[][] familyNames = new byte[][] { Bytes.toBytes("cf1"),
    Bytes.toBytes("cf2") };

  // one of the column families isn't splittable
  int[] rowCounts = new int[] { 6000, 1 };
  splitTest(null, familyNames, rowCounts, numVersions, blockSize);

  rowCounts = new int[] { 1, 6000 };
  splitTest(null, familyNames, rowCounts, numVersions, blockSize);

  // one column family has much smaller data than the other
  // the split key should be based on the largest column family
  rowCounts = new int[] { 6000, 300 };
  splitTest(null, familyNames, rowCounts, numVersions, blockSize);

  rowCounts = new int[] { 300, 6000 };
  splitTest(null, familyNames, rowCounts, numVersions, blockSize);

}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:33,代碼來源:TestAdmin1.java

示例3: __getVersions

/**
 * @return the value of the VERSIONS attribute or its default if it is unset
 */
public int __getVersions() {
  Object o = attrs.get(VERSIONS);
  return o != null ? 
    Integer.valueOf(o.toString()) : HColumnDescriptor.DEFAULT_VERSIONS;
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:8,代碼來源:ColumnSchemaModel.java


注:本文中的org.apache.hadoop.hbase.HColumnDescriptor.DEFAULT_VERSIONS屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。