Package org.apache.falcon.client

Examples of org.apache.falcon.client.FalconCLIException


            EntityList entityList = client.getEntityList(entityType);
            result = entityList != null ? entityList.toString() : "No entity of type (" + entityType + ") found.";
        } else if (optionsList.contains(HELP_CMD)) {
            OUT.get().println("Falcon Help");
        } else {
            throw new FalconCLIException("Invalid command");
        }
        OUT.get().println(result);
    }
View Full Code Here


    private void validateFilePath(String filePath)
        throws FalconCLIException {

        if (filePath == null || filePath.equals("")) {
            throw new FalconCLIException("Missing argument: file");
        }
    }
View Full Code Here

    private void validateColo(Set<String> optionsList)
        throws FalconCLIException {

        if (optionsList.contains(COLO_OPT)) {
            throw new FalconCLIException("Invalid argument : " + COLO_OPT);
        }
    }
View Full Code Here

    private Date validateTime(String time) throws FalconCLIException {
        if (time != null && !time.isEmpty()) {
            try {
                return SchemaHelper.parseDateUTC(time);
            } catch(Exception e) {
                throw new FalconCLIException("Time " + time + " is not valid", e);
            }
        }
        return null;
    }
View Full Code Here

    }

    private void validateEntityName(String entityName)
        throws FalconCLIException {
        if (entityName == null || entityName.equals("")) {
            throw new FalconCLIException("Missing argument: name");
        }
    }
View Full Code Here

    private void validateEntityType(String entityType)
        throws FalconCLIException {

        if (entityType == null || entityType.equals("")) {
            throw new FalconCLIException("Missing argument: type");
        }
    }
View Full Code Here

            result = client.getVertexEdges(id, direction);
        } else if (optionsList.contains(EDGE_CMD)) {
            validateId(id);
            result = client.getEdge(id);
        } else {
            throw new FalconCLIException("Invalid command");
        }

        OUT.get().println(result);
    }
View Full Code Here

        OUT.get().println(result);
    }

    private void validateId(String id) throws FalconCLIException {
        if (id == null || id.length() == 0) {
            throw new FalconCLIException("Missing argument: id");
        }
    }
View Full Code Here

        }
    }

    private void validateVerticesCommand(String key, String value) throws FalconCLIException {
        if (key == null || key.length() == 0) {
            throw new FalconCLIException("Missing argument: key");
        }

        if (value == null || value.length() == 0) {
            throw new FalconCLIException("Missing argument: value");
        }
    }
View Full Code Here

        }
    }

    private void validateVertexEdgesCommand(String id, String direction) throws FalconCLIException {
        if (id == null || id.length() == 0) {
            throw new FalconCLIException("Missing argument: id");
        }

        if (direction == null || direction.length() == 0) {
            throw new FalconCLIException("Missing argument: direction");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.falcon.client.FalconCLIException

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.