PageRenderTime 27ms CodeModel.GetById 12ms app.highlight 10ms RepoModel.GetById 2ms app.codeStats 0ms

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

#
Java | 107 lines | 41 code | 16 blank | 50 comment | 0 complexity | 79565e4ba37d98aa88cd57abab33c4db 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 * DescDatabaseDesc.
 27 *
 28 */
 29@Explain(displayName = "Describe Database")
 30public class DescDatabaseDesc extends DDLDesc implements Serializable {
 31
 32  private static final long serialVersionUID = 1L;
 33
 34  String dbName;
 35  String resFile;
 36  boolean isExt;
 37
 38  /**
 39   * thrift ddl for the result of describe database.
 40   */
 41  private static final String schema = "db_name,comment,location,parameters#string:string:string:string";
 42
 43  public DescDatabaseDesc() {
 44  }
 45
 46  /**
 47   * @param partSpec
 48   * @param resFile
 49   * @param tableName
 50   */
 51  public DescDatabaseDesc(Path resFile, String dbName, boolean isExt) {
 52    this.isExt = isExt;
 53    this.resFile = resFile.toString();
 54    this.dbName = dbName;
 55  }
 56
 57  public static String getSchema() {
 58    return schema;
 59  }
 60
 61  /**
 62   * @return the isExt
 63   */
 64  public boolean isExt() {
 65    return isExt;
 66  }
 67
 68  /**
 69   * @param isExt
 70   *          the isExt to set
 71   */
 72  public void setExt(boolean isExt) {
 73    this.isExt = isExt;
 74  }
 75
 76  /**
 77   * @return the tableName
 78   */
 79  @Explain(displayName = "database")
 80  public String getDatabaseName() {
 81    return dbName;
 82  }
 83
 84  /**
 85   * @param tableName
 86   *          the tableName to set
 87   */
 88  public void setDatabaseName(String db) {
 89    this.dbName = db;
 90  }
 91
 92  /**
 93   * @return the resFile
 94   */
 95  @Explain(displayName = "result file", normalExplain = false)
 96  public String getResFile() {
 97    return resFile;
 98  }
 99
100  /**
101   * @param resFile
102   *          the resFile to set
103   */
104  public void setResFile(String resFile) {
105    this.resFile = resFile;
106  }
107}