super(o);
}
public ReturnMsg execute(Configuration conf) {
try {
HBaseAdmin admin = new HBaseAdmin(conf);
Set<String> columns = null;
HColumnDescriptor columnDesc = null;
switch (operationType) {
case ADD:
disableTable(admin, table);
columns = columnSpecMap.keySet();
for (String c : columns) {
columnDesc = getColumnDescriptor(c, columnSpecMap.get(c));
println("Adding " + c + " to " + table +
"... Please wait.");
admin.addColumn(new Text(table), columnDesc);
}
enableTable(admin, table);
break;
case DROP:
disableTable(admin, table);
println("Dropping " + column + " from " + table +
"... Please wait.");
column = appendDelimiter(column);
admin.deleteColumn(new Text(table), new Text(column));
enableTable(admin, table);
break;
case CHANGE:
// Not yet supported
return new ReturnMsg(0, "" + operationType + " is not yet supported.");