Package org.kitesdk.data

Examples of org.kitesdk.data.DatasetIOException


      if (!fileSystem.delete(partitionDirectory, true)) {
        throw new IOException("Partition directory " + partitionDirectory
          + " for key " + key + " does not exist");
      }
    } catch (IOException e) {
      throw new DatasetIOException("Unable to locate or drop dataset partition directory " + partitionDirectory, e);
    }
  }
View Full Code Here


    try {
      fileStatuses = fileSystem.listStatus(directory,
        PathFilters.notHidden());
    } catch (IOException e) {
      throw new DatasetIOException("Unable to list partition directory for directory " + directory, e);
    }

    for (FileStatus stat : fileStatuses) {
      Path p = fileSystem.makeQualified(stat.getPath());
      PartitionKey key = keyFromDirectory(p.getName());
View Full Code Here

        if (!renameOk) {
          throw new IOException("Dataset merge failed during rename of " + path +
              " to " + newPath);
        }
      } catch (IOException e) {
        throw new DatasetIOException("Dataset merge failed", e);
      }
      if (descriptor.isPartitioned() && partitionListener != null) {
        String partition = newPartitionDirectory.toString();
        if (!addedPartitions.contains(partition)) {
          partitionListener.partitionAdded(namespace, name, partition);
View Full Code Here

      try {
        for (FileStatus st : fileSystem.listStatus(dir)) {
          size += st.getLen();
        }
      } catch (IOException e) {
        throw new DatasetIOException("Cannot find size of " + dir, e);
      }
    }
    return size;
  }
View Full Code Here

          if (lastMod < st.getModificationTime()) {
            lastMod = st.getModificationTime();
          }
        }
      } catch (IOException e) {
        throw new DatasetIOException("Cannot find last modified time of of " + dir, e);
      }
    }
    return lastMod;
  }
View Full Code Here

      if (fileSystem == null) {
        try {
          this.fileSystem = directory.getFileSystem(conf);
        } catch (IOException ex) {
          throw new DatasetIOException("Cannot access FileSystem", ex);
        }
      }

      Path absoluteDirectory = fileSystem.makeQualified(directory);
      return new FileSystemDataset<E>(
View Full Code Here

    try {
      this.fs = root.getFileSystem(conf);
      this.root = fs.makeQualified(root);
      this.storage = fs.makeQualified(temporaryRoot(root, namespace, key));
    } catch (IOException e) {
      throw new DatasetIOException(
          "Cannot setup temporary repository: " + key, e);
    }
    LOG.debug("Created temporary dataset repository with root {} and storage {}.", root,
        storage);
  }
View Full Code Here

          if (nextFileSet.size() > 0) {
            this.files = nextFileSet.iterator();
            return true;
          }
        } catch (IOException ex) {
          throw new DatasetIOException("Cannot list files in " + pair.second(), ex);
        }
      } else {
        return false;
      }
    }
View Full Code Here

    Preconditions.checkNotNull(provider, "Metadata provider cannot be null");

    try {
      this.fs = rootDirectory.getFileSystem(conf);
    } catch (IOException e) {
      throw new DatasetIOException(
          "Cannot get FileSystem for repository location: " + rootDirectory, e);
    }

    this.conf = conf;
    this.rootDirectory = fs.makeQualified(rootDirectory);
View Full Code Here

                "Failed to delete dataset name:" + name +
                " location:" + dataLocation);
          }
        }
      } catch (IOException e) {
        throw new DatasetIOException(
            "Internal failure when removing location:" + dataLocation, e);
      }
    }
    return changed;
  }
View Full Code Here

TOP

Related Classes of org.kitesdk.data.DatasetIOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.