PageRenderTime 29ms CodeModel.GetById 17ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Java | 131 lines | 56 code | 17 blank | 58 comment | 0 complexity | c4d18317a133f6f588e21d63077083e1 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;
 22import java.util.HashMap;
 23
 24import org.apache.hadoop.fs.Path;
 25
 26/**
 27 * ShowLocksDesc.
 28 *
 29 */
 30@Explain(displayName = "Show Locks")
 31public class ShowLocksDesc extends DDLDesc implements Serializable {
 32  private static final long serialVersionUID = 1L;
 33  String resFile;
 34  String tableName;
 35  HashMap<String, String> partSpec;
 36  boolean isExt;
 37
 38  /**
 39   * table name for the result of show locks.
 40   */
 41  private static final String table = "showlocks";
 42  /**
 43   * thrift ddl for the result of show locks.
 44   */
 45  private static final String schema = "tab_name,mode#string:string";
 46
 47  public String getTable() {
 48    return table;
 49  }
 50
 51  public String getSchema() {
 52    return schema;
 53  }
 54
 55  public ShowLocksDesc() {
 56  }
 57
 58  /**
 59   * @param resFile
 60   */
 61  public ShowLocksDesc(Path resFile, String tableName,
 62                       HashMap<String, String> partSpec, boolean isExt) {
 63    this.resFile   = resFile.toString();
 64    this.partSpec  = partSpec;
 65    this.tableName = tableName;
 66    this.isExt     = isExt;
 67  }
 68
 69  /**
 70   * @return the tableName
 71   */
 72  @Explain(displayName = "table")
 73  public String getTableName() {
 74    return tableName;
 75  }
 76
 77  /**
 78   * @param tableName
 79   *          the tableName to set
 80   */
 81  public void setTableName(String tableName) {
 82    this.tableName = tableName;
 83  }
 84
 85  /**
 86   * @return the partSpec
 87   */
 88  @Explain(displayName = "partition")
 89  public HashMap<String, String> getPartSpec() {
 90    return partSpec;
 91  }
 92
 93  /**
 94   * @param partSpec
 95   *          the partSpec to set
 96   */
 97  public void setPartSpecs(HashMap<String, String> partSpec) {
 98    this.partSpec = partSpec;
 99  }
100
101  /**
102   * @return the resFile
103   */
104  @Explain(displayName = "result file", normalExplain = false)
105  public String getResFile() {
106    return resFile;
107  }
108
109  /**
110   * @param resFile
111   *          the resFile to set
112   */
113  public void setResFile(String resFile) {
114    this.resFile = resFile;
115  }
116
117  /**
118   * @return the isExt
119   */
120  public boolean isExt() {
121    return isExt;
122  }
123
124  /**
125   * @param isExt
126   *          the isExt to set
127   */
128  public void setExt(boolean isExt) {
129    this.isExt = isExt;
130  }
131}