client.ensureTableExists(table).join(joinTimeout); } catch (InterruptedException e1) { Thread.currentThread().interrupt();
/** * Ensures that a specific table exists. * * @param table the table to check. * * @return a {@link Deferred} indicating the completion of the assertion. * * @throws TableNotFoundException (Deferred) if the table does not exist. * * @see org.hbase.async.HBaseClient#ensureTableExists(String) */ public Deferred<Object> ensureTableExists(final String table) { return client.ensureTableExists(table); }
/** * Ensures that a specific table exists. * * @param table the table to check. * * @return a {@link Deferred} indicating the completion of the assertion. * * @throws TableNotFoundException (Deferred) if the table does not exist. * * @see org.hbase.async.HBaseClient#ensureTableExists(byte[]) */ public Deferred<Object> ensureTableExists(final byte[] table) { return client.ensureTableExists(table); }
@Nonnull @Override public Collection<Runnable> getRunnables(@Nonnull UUID jobId, int sliceId, @Nonnull UUID workerId, @Nonnull ScopedProgressClient progressClient) throws IOException { List<Runnable> runnables = Lists.newArrayList(); client = new HBaseClient(zkQuorum); try { client.ensureTableExists(table).joinUninterruptibly(); } catch (TableNotFoundException e) { logger.warn("Table " + table + " doesn't exist", e); throw new RuntimeException(e); } catch (Exception e) { logger.warn("Couldn't check if table exists", e); throw new RuntimeException(e); } int quantaPerThread = numQuanta / numThreads; for (int i = 0; i < numThreads; i++) { runnables.add(new HbaseAsyncRunnable(taskOperation, client, quantaPerThread, table, columnFamily, qualifier, keyGeneratorFactory.getKeyGenerator(), valueGeneratorFactory.getValueGenerator(), workerId, sliceId, batchSize, jobId)); } return runnables; }
client.ensureTableExists(table).joinUninterruptibly(); client.ensureTableExists(uidtable).joinUninterruptibly();
return ensureTableExists(table).addCallback(new Retry());
this.client = new HBaseClient(this.river.getHosts()); this.logger.debug("Checking if table {} actually exists in HBase DB", this.river.getTable()); this.client.ensureTableExists(this.river.getTable()).addErrback(this.cbLogger); this.logger.debug("Fetching HBase Scanner"); this.scanner = this.client.newScanner(this.river.getTable());