PageRenderTime 37ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/java/org/apache/hadoop/hive/ql/parse/PrunedPartitionList.java

#
Java | 97 lines | 29 code | 12 blank | 56 comment | 0 complexity | 74bbb6ebf6425f7255464be80655cf49 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.parse;
  19. import java.util.Set;
  20. import org.apache.hadoop.hive.ql.metadata.Partition;
  21. /**
  22. * The list of pruned partitions.
  23. */
  24. public class PrunedPartitionList {
  25. // confirmed partitions - satisfy the partition criteria
  26. private Set<Partition> confirmedPartns;
  27. // unknown partitions - may/may not satisfy the partition criteria
  28. private Set<Partition> unknownPartns;
  29. // denied partitions - do not satisfy the partition criteria
  30. private final Set<Partition> deniedPartns;
  31. /**
  32. * @param confirmedPartns
  33. * confirmed paritions
  34. * @param unknownPartns
  35. * unknown partitions
  36. */
  37. public PrunedPartitionList(Set<Partition> confirmedPartns,
  38. Set<Partition> unknownPartns, Set<Partition> deniedPartns) {
  39. this.confirmedPartns = confirmedPartns;
  40. this.unknownPartns = unknownPartns;
  41. this.deniedPartns = deniedPartns;
  42. }
  43. /**
  44. * get confirmed partitions.
  45. *
  46. * @return confirmedPartns confirmed paritions
  47. */
  48. public Set<Partition> getConfirmedPartns() {
  49. return confirmedPartns;
  50. }
  51. /**
  52. * get unknown partitions.
  53. *
  54. * @return unknownPartns unknown paritions
  55. */
  56. public Set<Partition> getUnknownPartns() {
  57. return unknownPartns;
  58. }
  59. /**
  60. * get denied partitions.
  61. *
  62. * @return deniedPartns denied paritions
  63. */
  64. public Set<Partition> getDeniedPartns() {
  65. return deniedPartns;
  66. }
  67. /**
  68. * set confirmed partitions.
  69. *
  70. * @param confirmedPartns
  71. * confirmed paritions
  72. */
  73. public void setConfirmedPartns(Set<Partition> confirmedPartns) {
  74. this.confirmedPartns = confirmedPartns;
  75. }
  76. /**
  77. * set unknown partitions.
  78. *
  79. * @param unknownPartns
  80. * unknown partitions
  81. */
  82. public void setUnknownPartns(Set<Partition> unknownPartns) {
  83. this.unknownPartns = unknownPartns;
  84. }
  85. }