All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kitesdk.data.spi.PartitionedDataset Maven / Gradle / Ivy

Go to download

The Kite Data Core module provides simple, intuitive APIs for working with datasets in the Hadoop Platform.

The newest version!
/*
 * Copyright 2014 Cloudera Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kitesdk.data.spi;

import org.kitesdk.data.Dataset;

@SuppressWarnings("deprecation")
public interface PartitionedDataset extends Dataset {

  /**
   * Get a partition for a {@link PartitionKey}, optionally creating the
   * partition if it doesn't already exist.
   *
   * @param key        The key used to look up the partition.
   * @param autoCreate If true, automatically creates the partition if it
   * doesn't exist.
   * @throws org.kitesdk.data.DatasetException
   */
  PartitionedDataset getPartition(PartitionKey key, boolean autoCreate);

  /**
   * Drop a partition for a {@link PartitionKey}. Dropping a partition that
   * doesn't exist results in a {@link org.kitesdk.data.DatasetException} being thrown.
   *
   * @param key The key used to look up the partition.
   * @throws org.kitesdk.data.DatasetException
   * @since 0.2.0
   */
  void dropPartition(PartitionKey key);

  /**
   * 

* Return partitions. *

*

* Note that, depending on the implementation, the returned iterable can hold * system resources until exhausted and/or finalized. *

* * @return an iterable over all partitions of this dataset * @throws org.kitesdk.data.DatasetException */ Iterable> getPartitions(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy