Examples of ImportException


Examples of com.cloudera.sqoop.util.ImportException

    super.jobSetup(job);

    // we shouldn't have gotten here if bulk load dir is not set
    // so let's throw a ImportException
    if(getContext().getDestination() == null){
      throw new ImportException("Can't run HBaseBulkImportJob without a " +
          "valid destination directory.");
    }

    TableMapReduceUtil.addDependencyJars(job.getConfiguration(), Preconditions.class);
    FileOutputFormat.setOutputPath(job, getContext().getDestination());
View Full Code Here

Examples of com.cloudera.sqoop.util.ImportException

    }
    catch (Exception e) {
      String errorMessage = String.format("Unrecoverable error while " +
        "performing the bulk load of files in [%s]",
        bulkLoadDir.toString());
      throw new ImportException(errorMessage, e);
    }
  }
View Full Code Here

Examples of com.cloudera.sqoop.util.ImportException

      jobSetup(job);
      setJob(job);
      boolean success = runJob(job);
      if (!success) {
        throw new ImportException("Import job failed!");
      }

      completeImport(job);

      if (options.isValidationEnabled()) {
View Full Code Here

Examples of com.cloudera.sqoop.util.ImportException

        getRowCountFromDB(context.getConnManager(), tableName), // source
        getRowCountFromHadoop(job));                            // target

      doValidate(options, conf, validationContext);
    } catch (ValidationException e) {
      throw new ImportException("Error validating row counts", e);
    } catch (SQLException e) {
      throw new ImportException("Error retrieving DB source row count", e);
    } catch (IOException e) {
      throw new ImportException("Error retrieving target row count", e);
    } catch (InterruptedException e) {
      throw new ImportException("Error retrieving target row count", e);
    }
  }
View Full Code Here

Examples of com.day.cq.polling.importer.ImportException

                        stream = new FileInputStream(file);
                        JcrUtils.putFile(targetParent, targetName, mimeType, stream);
                        node.getSession().save();
                    } catch (RepositoryException e) {
                        throw new ImportException("Unable to import from file '" + dataSource + "' to '"
                                + target.getPath() + "'", e);
                    } catch (FileNotFoundException e) {
                        throw new ImportException("Unexpected FileNotFoundException while importing", e);
                    } finally {
                        if (stream != null) {
                            IOUtils.closeQuietly(stream);
                        }
                    }
View Full Code Here

Examples of de.danet.an.workflow.api.ImportException

                    e.getMessage()));
        }
        List pms = eh.getMessages();
       
        if (eh.getErrors().size() > 0 || eh.getFatalErrors().size() > 0) {
            throw new ImportException
          ("There have been problems while parsing XPDL", pms);
        }
        // the first element of the result list is list of prioritized messages
        resultList.add(pms);
        // follows the list of process definitions
View Full Code Here

Examples of edu.uga.galileo.voci.exception.ImportException

  public ArrayList<VociBusinessObject> performQuery( String query,
      ContentType type, int projectId ) throws ImportException
  {
    if ((type == ContentType.COMMUNITY) && (!query.startsWith("id:")))
    {
      throw new ImportException("Invalid query.  Repository imports "
          + "can only be done by id.");
    }
    else if ((type == ContentType.COLLECTION)
        && (!((query.startsWith("id:")) || (query.startsWith("repo:")))))
    {
      throw new ImportException("Invalid query.  Collection imports "
          + "must be done individually by id, or collectively "
          + "by repository.");
    }
    else if ((type == ContentType.ITEM)
        && (!((query.startsWith("id:")) || (query.startsWith("coll:")))))
    {
      throw new ImportException("Invalid query.  Item imports "
          + "must be done individually by id, or collectively "
          + "by collection.");
    }

    Document document = null;
View Full Code Here

Examples of org.newinstance.gucoach.exception.ImportException

            String[] playerRecord;
            try {
                // parse player's record and fill it into an array
                playerRecord = parser.parseLine(line[0]);
            } catch (final IOException ioe) {
                throw new ImportException(ResourceLoader.getMessage(MessageId.E002.getMessageKey()), ioe);
            }

            // if first part is numeric it is actually a player
            if (StringUtils.isNumeric(playerRecord[0])) {
                convertRecordToPlayer(playerRecord);
View Full Code Here

Examples of org.newinstance.gucoach.exception.ImportException

            String[] playerHistory;
            try {
                // parse player's history and fill it into an array
                playerHistory = parser.parseLine(line[0]);
            } catch (final IOException ioe) {
                throw new ImportException(ResourceLoader.getMessage(MessageId.E002.getMessageKey()), ioe);
            }

            // if first part is numeric it is actually a player's history
            if (StringUtils.isNumeric(playerHistory[0])) {
                // use a boolean variable to stop parsing after history section
View Full Code Here

Examples of org.newinstance.gucoach.exception.ImportException

            reader = new CSVReader(inputStreamReader);
            // read all content from CSV file
            content = reader.readAll();
            if (content.isEmpty()) {
                // nothing to import
                throw new ImportException(ResourceLoader.getMessage(MessageId.E003.getMessageKey()));
            }
            fileContent.addAll(content);
        } catch (final IOException ioe) {
            throw new ImportException(ResourceLoader.getMessage(MessageId.E004.getMessageKey()), ioe);
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (final IOException e) {
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.