org.apache.hadoop.hbase.client.ConnectionConfiguration Java Examples
The following examples show how to use
org.apache.hadoop.hbase.client.ConnectionConfiguration.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestMobStoreScanner.java From hbase with Apache License 2.0 | 5 votes |
@BeforeClass public static void setUpBeforeClass() throws Exception { TEST_UTIL.getConfiguration().setInt(ConnectionConfiguration.MAX_KEYVALUE_SIZE_KEY, 100 * 1024 * 1024); TEST_UTIL.getConfiguration().setInt(HRegion.HBASE_MAX_CELL_SIZE_KEY, 100 * 1024 * 1024); TEST_UTIL.startMiniCluster(1); }
Example #2
Source File: TableRecordReaderImpl.java From hbase with Apache License 2.0 | 5 votes |
/** * @param htable the {@link org.apache.hadoop.hbase.HTableDescriptor} to scan. */ public void setHTable(Table htable) { Configuration conf = htable.getConfiguration(); logScannerActivity = conf.getBoolean( ConnectionConfiguration.LOG_SCANNER_ACTIVITY, false); logPerRowCount = conf.getInt(LOG_PER_ROW_COUNT, 100); this.htable = htable; }
Example #3
Source File: TableRecordReaderImpl.java From hbase with Apache License 2.0 | 5 votes |
/** * Sets the HBase table. * * @param htable The {@link org.apache.hadoop.hbase.HTableDescriptor} to scan. */ public void setHTable(Table htable) { Configuration conf = htable.getConfiguration(); logScannerActivity = conf.getBoolean( ConnectionConfiguration.LOG_SCANNER_ACTIVITY, false); logPerRowCount = conf.getInt(LOG_PER_ROW_COUNT, 100); this.htable = htable; }
Example #4
Source File: IntegrationTestBigLinkedList.java From hbase with Apache License 2.0 | 4 votes |
@Override protected void setup(Context context) throws IOException, InterruptedException { id = Bytes.toBytes("Job: "+context.getJobID() + " Task: " + context.getTaskAttemptID()); this.connection = ConnectionFactory.createConnection(context.getConfiguration()); instantiateHTable(); this.width = context.getConfiguration().getInt(GENERATOR_WIDTH_KEY, WIDTH_DEFAULT); current = new byte[this.width][]; int wrapMultiplier = context.getConfiguration().getInt(GENERATOR_WRAP_KEY, WRAP_DEFAULT); this.wrap = (long)wrapMultiplier * width; this.numNodes = context.getConfiguration().getLong( GENERATOR_NUM_ROWS_PER_MAP_KEY, (long)WIDTH_DEFAULT * WRAP_DEFAULT); if (this.numNodes < this.wrap) { this.wrap = this.numNodes; } this.multipleUnevenColumnFamilies = isMultiUnevenColumnFamilies(context.getConfiguration()); this.numWalkers = context.getConfiguration().getInt(CONCURRENT_WALKER_KEY, CONCURRENT_WALKER_DEFAULT); this.walkersStop = false; this.conf = context.getConfiguration(); if (multipleUnevenColumnFamilies) { int n = context.getConfiguration().getInt(BIG_FAMILY_VALUE_SIZE_KEY, 256); int limit = context.getConfiguration().getInt( ConnectionConfiguration.MAX_KEYVALUE_SIZE_KEY, ConnectionConfiguration.MAX_KEYVALUE_SIZE_DEFAULT); Preconditions.checkArgument( n <= limit, "%s(%s) > %s(%s)", BIG_FAMILY_VALUE_SIZE_KEY, n, ConnectionConfiguration.MAX_KEYVALUE_SIZE_KEY, limit); bigValue = new byte[n]; ThreadLocalRandom.current().nextBytes(bigValue); LOG.info("Create a bigValue with " + n + " bytes."); } Preconditions.checkArgument( numNodes > 0, "numNodes(%s) <= 0", numNodes); Preconditions.checkArgument( numNodes % width == 0, "numNodes(%s) mod width(%s) != 0", numNodes, width); Preconditions.checkArgument( numNodes % wrap == 0, "numNodes(%s) mod wrap(%s) != 0", numNodes, wrap ); }