/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.hadoop.hbase.thrift.generated;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
import com.facebook.thrift.*;
import com.facebook.thrift.protocol.*;
import com.facebook.thrift.transport.*;
public class Hbase {
public interface Iface {
/**
* Brings a table on-line (enables it)
* @param tableName name of the table
*/
public void enableTable(byte[] tableName) throws IOError, TException;
/**
* Disables a table (takes it off-line) If it is being served, the master
* will tell the servers to stop serving it.
* @param tableName name of the table
*/
public void disableTable(byte[] tableName) throws IOError, TException;
/**
* @param tableName name of table to check
* @return true if table is on-line
*/
public boolean isTableEnabled(byte[] tableName) throws IOError, TException;
/**
* List all the userspace tables.
* @return - returns a list of names
*/
public List<byte[]> getTableNames() throws IOError, TException;
/**
* List all the column families assoicated with a table.
* @param tableName table name
* @return list of column family descriptors
*/
public Map<byte[],ColumnDescriptor> getColumnDescriptors(byte[] tableName) throws IOError, TException;
/**
* List the regions associated with a table.
* @param tableName table name
* @return list of region descriptors
*/
public List<TRegionInfo> getTableRegions(byte[] tableName) throws IOError, TException;
/**
* Create a table with the specified column families. The name
* field for each ColumnDescriptor must be set and must end in a
* colon (:). All other fields are optional and will get default
* values if not explicitly specified.
*
* @param tableName name of table to create
* @param columnFamilies list of column family descriptors
*
* @throws IllegalArgument if an input parameter is invalid
* @throws AlreadyExists if the table name already exists
*/
public void createTable(byte[] tableName, List<ColumnDescriptor> columnFamilies) throws IOError, IllegalArgument, AlreadyExists, TException;
/**
* Deletes a table
* @param tableName name of table to delete
* @throws NotFound if table doesn't exist on server
*/
public void deleteTable(byte[] tableName) throws IOError, NotFound, TException;
/**
* Get a single TCell for the specified table, row, and column at the
* latest timestamp.
*
* @param tableName name of table
* @param row row key
* @param column column name
* @return value for specified row/column
*/
public TCell get(byte[] tableName, byte[] row, byte[] column) throws IOError, NotFound, TException;
/**
* Get the specified number of versions for the specified table,
* row, and column.
*
* @param tableName name of table
* @param row row key
* @param column column name
* @param numVersions number of versions to retrieve
* @return list of cells for specified row/column
*/
public List<TCell> getVer(byte[] tableName, byte[] row, byte[] column, int numVersions) throws IOError, NotFound, TException;
/**
* Get the specified number of versions for the specified table,
* row, and column. Only versions less than or equal to the specified
* timestamp will be returned.
*
* @param tableName name of table
* @param row row key
* @param column column name
* @param timestamp timestamp
* @param numVersions number of versions to retrieve
* @return list of cells for specified row/column
*/
public List<TCell> getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions) throws IOError, NotFound, TException;
/**
* Get all the data for the specified table and row at the latest
* timestamp.
*
* @param tableName name of table
* @param row row key
* @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
*/
public TRowResult getRow(byte[] tableName, byte[] row) throws IOError, TException;
/**
* Get the specified columns for the specified table and row at the latest
* timestamp.
*
* @param tableName name of table
* @param row row key
* @param columns List of columns to return, null for all columns
* @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
*/
public TRowResult getRowWithColumns(byte[] tableName, byte[] row, List<byte[]> columns) throws IOError, TException;
/**
* Get all the data for the specified table and row at the specified
* timestamp.
*
* @param tableName of table
* @param row row key
* @param timestamp timestamp
* @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
*/
public TRowResult getRowTs(byte[] tableName, byte[] row, long timestamp) throws IOError, TException;
/**
* Get the specified columns for the specified table and row at the specified
* timestamp.
*
* @param tableName name of table
* @param row row key
* @param columns List of columns to return, null for all columns
* @return TRowResult containing the row and map of columns to TCells. Map is empty if row does not exist.
*/
public TRowResult getRowWithColumnsTs(byte[] tableName, byte[] row, List<byte[]> columns, long timestamp) throws IOError, TException;
/**
* Apply a series of mutations (updates/deletes) to a row in a
* single transaction. If an exception is thrown, then the
* transaction is aborted. Default current timestamp is used, and
* all entries will have an identical timestamp.
*
* @param tableName name of table
* @param row row key
* @param mutations list of mutation commands
*/
public void mutateRow(byte[] tableName, byte[] row, List<Mutation> mutations) throws IOError, IllegalArgument, TException;
/**
* Apply a series of mutations (updates/deletes) to a row in a
* single transaction. If an exception is thrown, then the
* transaction is aborted. The specified timestamp is used, and
* all entries will have an identical timestamp.
*
* @param tableName name of table
* @param row row key
* @param mutations list of mutation commands
* @param timestamp timestamp
*/
public void mutateRowTs(byte[] tableName, byte[] row, List<Mutation> mutations, long timestamp) throws IOError, IllegalArgument, TException;
/**
* Apply a series of batches (each a series of mutations on a single row)
* in a single transaction. If an exception is thrown, then the
* transaction is aborted. Default current timestamp is used, and
* all e
- 1
- 2
- 3
前往页