Examples of MorphlineRuntimeException


Examples of com.cloudera.cdk.morphline.api.MorphlineRuntimeException

      }
      case NULL: {
        break;
      }
      default:
        throw new MorphlineRuntimeException("Unknown Avro schema type: " + schema.getType());
      }
    }
View Full Code Here

Examples of com.cloudera.cdk.morphline.api.MorphlineRuntimeException

      ArchiveInputStream ais;
      try {
        ArchiveStreamFactory factory = new ArchiveStreamFactory();
        ais = factory.createArchiveInputStream(stream);
      } catch (ArchiveException e) {
        throw new MorphlineRuntimeException("Unable to unpack document stream", e);
      }

      try {
        ArchiveEntry entry = ais.getNextEntry();
        while (entry != null) {
          if (!entry.isDirectory()) {
            if (!parseEntry(ais, entry, extractor, record)) {
              return false;
            }
          }
          entry = ais.getNextEntry();
        }
      } catch (IOException e) {
        throw new MorphlineRuntimeException(e);
      } finally {
        Closeables.closeQuietly(ais);
      }
      return true;
    }
View Full Code Here

Examples of com.cloudera.cdk.morphline.api.MorphlineRuntimeException

          if (item == null) {
            return null;
          }
          return ERROR;
        default:
          throw new MorphlineRuntimeException("Unknown Avro schema type: " + schema.getType());
      }
    }
View Full Code Here

Examples of com.cloudera.cdk.morphline.api.MorphlineRuntimeException

          }
          if (dataFileWriter != null) {
            dataFileWriter.flush();
          }
        } catch (IOException e) {
          throw new MorphlineRuntimeException(e);
        }
      } finally {
        Closeables.closeQuietly(dataFileWriter);
      }
    }
View Full Code Here

Examples of com.cloudera.cdk.morphline.api.MorphlineRuntimeException

          }
          datumWriter.write(datum, encoder);
        }
        encoder.flush();
      } catch (IOException e) {
        throw new MorphlineRuntimeException(e);
      }
    }
View Full Code Here

Examples of com.cloudera.cdk.morphline.api.MorphlineRuntimeException

    }
   
    private Schema getSchema(GenericContainer datum, Schema lastSchema) {
      Schema schema = datum.getSchema();
      if (lastSchema != null && lastSchema != schema) {
        throw new MorphlineRuntimeException("Schemas must be identical: " + schema + ", lastSchema: " + lastSchema);
      }
      return schema;
    }
View Full Code Here

Examples of com.cloudera.cdk.morphline.api.MorphlineRuntimeException

          server.setHandler(servletContextHandler);
         
          try {
            server.start();
          } catch (Exception e) {
            throw new MorphlineRuntimeException(e);
          }
         
          SERVERS.put(port, server);
        }
      }
View Full Code Here

Examples of com.cloudera.cdk.morphline.api.MorphlineRuntimeException

            if (server != null) {
              try {
                server.stop();
                server.join();
              } catch (Exception e) {
                throw new MorphlineRuntimeException(e);
              }
            }
          }
        }
      }
View Full Code Here

Examples of com.cloudera.cdk.morphline.api.MorphlineRuntimeException

          return readColumnWise(reader, template);
        default :
          throw new IllegalStateException();
        }
      } catch (IOException e) {
        throw new MorphlineRuntimeException("IOException while processing attachment "
                + attachmentPath.getName(), e);
      } finally {
        if (reader != null) {
          reader.close();
        }
View Full Code Here

Examples of org.kitesdk.morphline.api.MorphlineRuntimeException

    InputStream stream = getAttachmentInputStream(record);
    try {
      return doProcess(record, stream);
    } catch (IOException e) {
      throw new MorphlineRuntimeException(e);
    } finally {
      Closeables.closeQuietly(stream);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.