PageRenderTime 35ms CodeModel.GetById 14ms RepoModel.GetById 0ms 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
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  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. package org.apache.hadoop.hive.ql.plan;
  19. import java.io.Serializable;
  20. import java.util.HashMap;
  21. import org.apache.hadoop.fs.Path;
  22. /**
  23. * ShowLocksDesc.
  24. *
  25. */
  26. @Explain(displayName = "Show Locks")
  27. public class ShowLocksDesc extends DDLDesc implements Serializable {
  28. private static final long serialVersionUID = 1L;
  29. String resFile;
  30. String tableName;
  31. HashMap<String, String> partSpec;
  32. boolean isExt;
  33. /**
  34. * table name for the result of show locks.
  35. */
  36. private static final String table = "showlocks";
  37. /**
  38. * thrift ddl for the result of show locks.
  39. */
  40. private static final String schema = "tab_name,mode#string:string";
  41. public String getTable() {
  42. return table;
  43. }
  44. public String getSchema() {
  45. return schema;
  46. }
  47. public ShowLocksDesc() {
  48. }
  49. /**
  50. * @param resFile
  51. */
  52. public ShowLocksDesc(Path resFile, String tableName,
  53. HashMap<String, String> partSpec, boolean isExt) {
  54. this.resFile = resFile.toString();
  55. this.partSpec = partSpec;
  56. this.tableName = tableName;
  57. this.isExt = isExt;
  58. }
  59. /**
  60. * @return the tableName
  61. */
  62. @Explain(displayName = "table")
  63. public String getTableName() {
  64. return tableName;
  65. }
  66. /**
  67. * @param tableName
  68. * the tableName to set
  69. */
  70. public void setTableName(String tableName) {
  71. this.tableName = tableName;
  72. }
  73. /**
  74. * @return the partSpec
  75. */
  76. @Explain(displayName = "partition")
  77. public HashMap<String, String> getPartSpec() {
  78. return partSpec;
  79. }
  80. /**
  81. * @param partSpec
  82. * the partSpec to set
  83. */
  84. public void setPartSpecs(HashMap<String, String> partSpec) {
  85. this.partSpec = partSpec;
  86. }
  87. /**
  88. * @return the resFile
  89. */
  90. @Explain(displayName = "result file", normalExplain = false)
  91. public String getResFile() {
  92. return resFile;
  93. }
  94. /**
  95. * @param resFile
  96. * the resFile to set
  97. */
  98. public void setResFile(String resFile) {
  99. this.resFile = resFile;
  100. }
  101. /**
  102. * @return the isExt
  103. */
  104. public boolean isExt() {
  105. return isExt;
  106. }
  107. /**
  108. * @param isExt
  109. * the isExt to set
  110. */
  111. public void setExt(boolean isExt) {
  112. this.isExt = isExt;
  113. }
  114. }