Ejemplo n.º 1
0
 /**
  * Delete an entity through falcon client.
  *
  * @param entityStr string of the entity to be submitted
  * @throws IOException
  */
 public ExecResult clientDelete(final String entityStr, String user) throws IOException {
   final String entityName = getEntityName(entityStr);
   LOGGER.info("Deleting " + getEntityType() + ": " + entityName);
   final CommandLine commandLine =
       FalconClientBuilder.getBuilder(user).getDeleteCommand(getEntityType(), entityName).build();
   return ExecUtil.executeCommand(commandLine);
 }
Ejemplo n.º 2
0
 /**
  * Submit an entity through falcon client.
  *
  * @param entityStr string of the entity to be submitted
  * @throws IOException
  */
 public ExecResult clientSubmit(final String entityStr) throws IOException {
   LOGGER.info(
       "Submitting "
           + getEntityType()
           + " through falcon client: \n"
           + Util.prettyPrintXml(entityStr));
   final String fileName = FileUtil.writeEntityToFile(entityStr);
   final CommandLine commandLine =
       FalconClientBuilder.getBuilder().getSubmitCommand(getEntityType(), fileName).build();
   return ExecUtil.executeCommand(commandLine);
 }
Ejemplo n.º 3
0
 /**
  * Get CLI metrics for recipe based process or feed replication.
  *
  * @param entityName
  * @return
  */
 public ExecResult getCLIMetrics(String entityName) {
   LOGGER.info("Getting CLI metrics for " + getEntityType() + " " + entityName);
   final CommandLine commandLine =
       FalconClientBuilder.getBuilder().getMetricsCommand(getEntityType(), entityName).build();
   return ExecUtil.executeCommand(commandLine);
 }