PageRenderTime 39ms CodeModel.GetById 13ms RepoModel.GetById 0ms 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
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 org.apache.hadoop.fs.Path;
  21. /**
  22. * DescDatabaseDesc.
  23. *
  24. */
  25. @Explain(displayName = "Describe Database")
  26. public class DescDatabaseDesc extends DDLDesc implements Serializable {
  27. private static final long serialVersionUID = 1L;
  28. String dbName;
  29. String resFile;
  30. boolean isExt;
  31. /**
  32. * thrift ddl for the result of describe database.
  33. */
  34. private static final String schema = "db_name,comment,location,parameters#string:string:string:string";
  35. public DescDatabaseDesc() {
  36. }
  37. /**
  38. * @param partSpec
  39. * @param resFile
  40. * @param tableName
  41. */
  42. public DescDatabaseDesc(Path resFile, String dbName, boolean isExt) {
  43. this.isExt = isExt;
  44. this.resFile = resFile.toString();
  45. this.dbName = dbName;
  46. }
  47. public static String getSchema() {
  48. return schema;
  49. }
  50. /**
  51. * @return the isExt
  52. */
  53. public boolean isExt() {
  54. return isExt;
  55. }
  56. /**
  57. * @param isExt
  58. * the isExt to set
  59. */
  60. public void setExt(boolean isExt) {
  61. this.isExt = isExt;
  62. }
  63. /**
  64. * @return the tableName
  65. */
  66. @Explain(displayName = "database")
  67. public String getDatabaseName() {
  68. return dbName;
  69. }
  70. /**
  71. * @param tableName
  72. * the tableName to set
  73. */
  74. public void setDatabaseName(String db) {
  75. this.dbName = db;
  76. }
  77. /**
  78. * @return the resFile
  79. */
  80. @Explain(displayName = "result file", normalExplain = false)
  81. public String getResFile() {
  82. return resFile;
  83. }
  84. /**
  85. * @param resFile
  86. * the resFile to set
  87. */
  88. public void setResFile(String resFile) {
  89. this.resFile = resFile;
  90. }
  91. }