/** * Gets the {@link RawTableInfo} associated with the given id. * * @param id the id of the table * @return the table info * @throws IOException when operation fails */ public synchronized RawTableInfo getClientRawTableInfo(final long id) throws IOException { return retryRPC(new RpcCallable<RawTableInfo>() { @Override public RawTableInfo call() throws TException { return mClient.getClientRawTableInfoById(id); } }); }
/** * Gets the {@link RawTableInfo} associated with the given path. * * @param path the path of the table * @return the table info * @throws IOException when operation fails */ public synchronized RawTableInfo getClientRawTableInfo(final TachyonURI path) throws IOException { return retryRPC(new RpcCallable<RawTableInfo>() { @Override public RawTableInfo call() throws TException { return mClient.getClientRawTableInfoByPath(path.getPath()); } }); }
/** * Updates the metadata of a table. * * @param tableId The id of the table to update * @param metadata The new metadata to update the table with * @throws IOException when the operation fails */ public void updateRawTableMetadata(final long tableId, final ByteBuffer metadata) throws IOException { retryRPC(new RpcCallable<Void>() { @Override public Void call() throws TException { mClient.updateRawTableMetadata(tableId, metadata); return null; } }); }
/** * Creates a raw table. A table is a directory with sub-directories representing columns. * * @param path the path where the table is placed * @param columns the number of columns in the table, must be in range (0, tachyon.max.columns) * @param metadata additional metadata about the table, cannot be null * @return the id of the table * @throws IOException when creation fails */ public synchronized long createRawTable(final TachyonURI path, final int columns, final ByteBuffer metadata) throws IOException { return retryRPC(new RpcCallable<Long>() { @Override public Long call() throws TException { return mClient.createRawTable(path.getPath(), columns, metadata); } }); }