Search in sources :

Example 1 with HbaseSchemaManagerTask

use of com.navercorp.pinpoint.hbase.manager.task.HbaseSchemaManagerTask in project pinpoint by naver.

the class HbaseSchemaManagerRunner method run.

@Override
public void run(ApplicationArguments args) throws Exception {
    logger.info("Launched with arguments : {}", Arrays.asList(args.getSourceArgs()));
    ProgramCommand programCommand = ProgramCommand.parseArgs(args);
    ProgramOptions programOptions = ProgramOptions.parseArgs(args);
    HbaseSchemaManagerTask task = taskFactory.create(programCommand, programOptions);
    try {
        task.run(programCommand.getCommandArgs());
    } catch (HbaseSchemaParseException | InvalidHbaseSchemaException e) {
        logger.error(Markers.TERMINAL, "{}, cause : {}", e.getMessage(), e.getCause().getMessage());
        logger.error(Markers.APP_LOG, "Hbase schema error.", e);
    } catch (HbaseSystemException e) {
        logger.error(Markers.TERMINAL, "Error accessing hbase : {}", e.getMessage());
        logger.error(Markers.APP_LOG, "Hbase error.", e);
    } catch (Exception e) {
        logger.error(Markers.TERMINAL, "Error running '{}' : {}", programCommand.getCommand(), e.getMessage());
        logger.error(Markers.APP_LOG, "Error running '" + programCommand.getCommand() + "'.", e);
    }
}
Also used : InvalidHbaseSchemaException(com.navercorp.pinpoint.hbase.schema.reader.InvalidHbaseSchemaException) HbaseSystemException(com.navercorp.pinpoint.common.hbase.HbaseSystemException) HbaseSchemaManagerTask(com.navercorp.pinpoint.hbase.manager.task.HbaseSchemaManagerTask) HbaseSchemaParseException(com.navercorp.pinpoint.hbase.schema.reader.HbaseSchemaParseException) HbaseSchemaParseException(com.navercorp.pinpoint.hbase.schema.reader.HbaseSchemaParseException) HbaseSystemException(com.navercorp.pinpoint.common.hbase.HbaseSystemException) InvalidHbaseSchemaException(com.navercorp.pinpoint.hbase.schema.reader.InvalidHbaseSchemaException)

Aggregations

HbaseSystemException (com.navercorp.pinpoint.common.hbase.HbaseSystemException)1 HbaseSchemaManagerTask (com.navercorp.pinpoint.hbase.manager.task.HbaseSchemaManagerTask)1 HbaseSchemaParseException (com.navercorp.pinpoint.hbase.schema.reader.HbaseSchemaParseException)1 InvalidHbaseSchemaException (com.navercorp.pinpoint.hbase.schema.reader.InvalidHbaseSchemaException)1