Example #1
0
/**
 * Parameters:
 *  - TableNameOrRegionName
 */
func (client *HClient) MajorCompact(tableNameOrRegionName string) (err error) {
	if err = client.Open(); err != nil {
		return
	}

	return checkHbaseError(client.thriftClient.MajorCompact(Hbase.Bytes(tableNameOrRegionName)))
}
Example #2
0
/**
 * Disables a table (takes it off-line) If it is being served, the master
 * will tell the servers to stop serving it.
 *
 * Parameters:
 *  - TableName: name of the table
 */
func (client *HClient) DisableTable(tableName string) (err error) {
	if err = client.Open(); err != nil {
		return
	}

	return checkHbaseError(client.thriftClient.DisableTable(Hbase.Bytes(tableName)))
}
Example #3
0
/**
 * Brings a table on-line (enables it)
 *
 * Parameters:
 *  - TableName: name of the table
 */
func (client *HClient) EnableTable(tableName string) error {
	if err := client.Open(); err != nil {
		return err
	}

	return checkHbaseError(client.thriftClient.EnableTable(Hbase.Bytes(tableName)))
}
Example #4
0
/**
 * @return true if table is on-line
 *
 * Parameters:
 *  - TableName: name of the table to check
 */
func (client *HClient) IsTableEnabled(tableName string) (ret bool, err error) {
	if err = client.Open(); err != nil {
		return
	}

	ret, io, e1 := client.thriftClient.IsTableEnabled(Hbase.Bytes(tableName))
	err = checkHbaseError(io, e1)
	return
}
Example #5
0
/**
 * Parameters:
 *  - TableNameOrRegionName
 */
func (client *HClient) MajorCompact(tableNameOrRegionName string) (err error) {
	return checkHbaseError(client.hbase.MajorCompact(Hbase.Bytes(tableNameOrRegionName)))
}
Example #6
0
/**
 * @return true if table is on-line
 *
 * Parameters:
 *  - TableName: name of the table to check
 */
func (client *HClient) IsTableEnabled(tableName string) (ret bool, err error) {
	ret, io, e1 := client.hbase.IsTableEnabled(Hbase.Bytes(tableName))
	err = checkHbaseError(io, e1)
	return
}
Example #7
0
/**
 * Disables a table (takes it off-line) If it is being served, the master
 * will tell the servers to stop serving it.
 *
 * Parameters:
 *  - TableName: name of the table
 */
func (client *HClient) DisableTable(tableName string) (err error) {
	return checkHbaseError(client.hbase.DisableTable(Hbase.Bytes(tableName)))
}
Example #8
0
/**
 * Brings a table on-line (enables it)
 *
 * Parameters:
 *  - TableName: name of the table
 */
func (client *HClient) EnableTable(tableName string) error {
	return checkHbaseError(client.hbase.EnableTable(Hbase.Bytes(tableName)))
}