View Javadoc

1   /*
2    * Copyright (c) 2010.  The Apache Software Foundation
3    *
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *     http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS,
16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   * See the License for the specific language governing permissions and
18   * limitations under the License.
19   */
20  
21  package org.apache.hadoop.hbase.hbql.statement;
22  
23  import org.apache.hadoop.hbase.hbql.client.ExecutionResults;
24  
25  public class HelpStatement extends GenericStatement implements NonConnectionStatement {
26  
27      public HelpStatement() {
28          super(null);
29      }
30  
31      public ExecutionResults execute() {
32  
33          final ExecutionResults retval = new ExecutionResults();
34  
35          retval.out.println(VersionStatement.usage());
36  
37          retval.out.println(CreateMappingStatement.usage());
38          retval.out.println(DropMappingStatement.usage());
39          retval.out.println(ShowMappingsStatement.usage());
40          retval.out.println(DescribeMappingStatement.usage());
41  
42          retval.out.println(CreateTableStatement.usage());
43          retval.out.println(AlterTableStatement.usage());
44          retval.out.println(EnableTableStatement.usage());
45          retval.out.println(DisableTableStatement.usage());
46          retval.out.println(SplitTableStatement.usage());
47          retval.out.println(FlushTableStatement.usage());
48          retval.out.println(CompactTableStatement.usage());
49          retval.out.println(DropTableStatement.usage());
50          retval.out.println(DescribeTableStatement.usage());
51          retval.out.println(ShowTablesStatement.usage());
52  
53          retval.out.println(CreateIndexStatement.usage());
54          retval.out.println(DropIndexForMappingStatement.usage());
55          retval.out.println(DropIndexForTableStatement.usage());
56          retval.out.println(DescribeIndexForMappingStatement.usage());
57          retval.out.println(DescribeIndexForTableStatement.usage());
58  
59          retval.out.println(CreateQueryExecutorPoolStatement.usage());
60          retval.out.println(DropQueryExecutorPoolStatement.usage());
61          retval.out.println(ShowQueryExecutorPoolsStatement.usage());
62  
63          retval.out.println(InsertStatement.usage());
64          retval.out.println(DeleteStatement.usage());
65          retval.out.println(SelectStatement.usage());
66  
67          retval.out.println(ImportStatement.usage());
68          retval.out.println(ParseStatement.usage());
69          retval.out.println(EvalStatement.usage());
70          retval.out.flush();
71  
72          return retval;
73      }
74  }