Package com.cloudera.cdk.morphline.api

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


      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

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

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

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

    }
   
    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

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

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

          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

        }

        try {
          parser.parse(inputStream, parsingHandler, metadata, parseContext);
        } catch (IOException e) {
          throw new MorphlineRuntimeException("Cannot parse", e);
        } catch (SAXException e) {
          throw new MorphlineRuntimeException("Cannot parse", e);
        } catch (TikaException e) {
          throw new MorphlineRuntimeException("Cannot parse", e);
        }
       
        LOG.trace("debug XML doc: {}", debugWriter);
      } finally {
        if (inputStream != null) {
View Full Code Here

TOP

Related Classes of com.cloudera.cdk.morphline.api.MorphlineRuntimeException

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.