PageRenderTime 22ms CodeModel.GetById 12ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/java/org/apache/hadoop/hive/ql/plan/ShowFunctionsDesc.java

#
Java | 102 lines | 41 code | 13 blank | 48 comment | 0 complexity | 0117408895468ab17ce7eee06ea2e175 MD5 | raw file
  1/**
  2 * Licensed to the Apache Software Foundation (ASF) under one
  3 * or more contributor license agreements.  See the NOTICE file
  4 * distributed with this work for additional information
  5 * regarding copyright ownership.  The ASF licenses this file
  6 * to you under the Apache License, Version 2.0 (the
  7 * "License"); you may not use this file except in compliance
  8 * with the License.  You may obtain a copy of the License at
  9 *
 10 *     http://www.apache.org/licenses/LICENSE-2.0
 11 *
 12 * Unless required by applicable law or agreed to in writing, software
 13 * distributed under the License is distributed on an "AS IS" BASIS,
 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 15 * See the License for the specific language governing permissions and
 16 * limitations under the License.
 17 */
 18
 19package org.apache.hadoop.hive.ql.plan;
 20
 21import java.io.Serializable;
 22
 23import org.apache.hadoop.fs.Path;
 24
 25/**
 26 * ShowFunctionsDesc.
 27 *
 28 */
 29@Explain(displayName = "Show Functions")
 30public class ShowFunctionsDesc extends DDLDesc implements Serializable {
 31  private static final long serialVersionUID = 1L;
 32  String pattern;
 33  String resFile;
 34  /**
 35   * table name for the result of show tables.
 36   */
 37  private static final String table = "show";
 38  /**
 39   * thrift ddl for the result of show tables.
 40   */
 41  private static final String schema = "tab_name#string";
 42
 43  public String getTable() {
 44    return table;
 45  }
 46
 47  public String getSchema() {
 48    return schema;
 49  }
 50
 51  public ShowFunctionsDesc() {
 52  }
 53
 54  /**
 55   * @param resFile
 56   */
 57  public ShowFunctionsDesc(Path resFile) {
 58    this.resFile = resFile.toString();
 59    pattern = null;
 60  }
 61
 62  /**
 63   * @param pattern
 64   *          names of tables to show
 65   */
 66  public ShowFunctionsDesc(Path resFile, String pattern) {
 67    this.resFile = resFile.toString();
 68    this.pattern = pattern;
 69  }
 70
 71  /**
 72   * @return the pattern
 73   */
 74  @Explain(displayName = "pattern")
 75  public String getPattern() {
 76    return pattern;
 77  }
 78
 79  /**
 80   * @param pattern
 81   *          the pattern to set
 82   */
 83  public void setPattern(String pattern) {
 84    this.pattern = pattern;
 85  }
 86
 87  /**
 88   * @return the resFile
 89   */
 90  @Explain(displayName = "result file", normalExplain = false)
 91  public String getResFile() {
 92    return resFile;
 93  }
 94
 95  /**
 96   * @param resFile
 97   *          the resFile to set
 98   */
 99  public void setResFile(String resFile) {
100    this.resFile = resFile;
101  }
102}