Package org.kitesdk.data

Examples of org.kitesdk.data.DatasetWriterException


        "Attempt to flush a writer in state:%s", state);
    try {
      appender.flush();
    } catch (IOException e) {
      this.state = ReaderWriterState.ERROR;
      throw new DatasetWriterException("Failed to flush appender " + appender);
    }
  }
View Full Code Here


      if (count > 0) {
        // commit the temp file
        try {
          if (!fs.rename(tempPath, finalPath)) {
            this.state = ReaderWriterState.ERROR;
            throw new DatasetWriterException(
                "Failed to move " + tempPath + " to " + finalPath);
          }
        } catch (IOException e) {
          this.state = ReaderWriterState.ERROR;
          throw new DatasetIOException("Failed to commit " + finalPath, e);
        }

        LOG.debug("Committed {} for appender {} ({} entities)",
            new Object[]{finalPath, appender, count});
      } else {
        // discard the temp file
        try {
          if (!fs.delete(tempPath, true)) {
            this.state = ReaderWriterState.ERROR;
            throw new DatasetWriterException("Failed to delete " + tempPath);
          }
        } catch (IOException e) {
          this.state = ReaderWriterState.ERROR;
          throw new DatasetIOException(
              "Failed to remove temporary file " + tempPath, e);
View Full Code Here

    } else if (Formats.CSV.equals(format) &&
        DescriptorUtil.isEnabled(FileSystemProperties.ALLOW_CSV_PROP, descriptor)) {
      return new CSVAppender<E>(fs, temp, descriptor);
    } else {
      this.state = ReaderWriterState.ERROR;
      throw new DatasetWriterException("Unknown format " + descriptor);
    }
  }
View Full Code Here

TOP

Related Classes of org.kitesdk.data.DatasetWriterException

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.