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