Examples of ProgramType


Examples of co.cask.cdap.proto.ProgramType

  public ProgramController run(Program program, ProgramOptions options) {
    // Extract and verify parameters
    ApplicationSpecification appSpec = program.getSpecification();
    Preconditions.checkNotNull(appSpec, "Missing application specification.");

    ProgramType processorType = program.getType();
    Preconditions.checkNotNull(processorType, "Missing processor type.");
    Preconditions.checkArgument(processorType == ProgramType.MAPREDUCE, "Only MAPREDUCE process type is supported.");

    MapReduceSpecification spec = appSpec.getMapReduce().get(program.getName());
    Preconditions.checkNotNull(spec, "Missing MapReduceSpecification for %s", program.getName());
View Full Code Here

Examples of co.cask.tigon.app.program.ProgramType

  @Override
  public ProgramController run(Program program, ProgramOptions options) {
    // Extract and verify parameters
    FlowSpecification flowSpec = program.getSpecification();
    ProgramType processorType = program.getType();
    Preconditions.checkNotNull(processorType, "Missing processor type.");
    Preconditions.checkArgument(processorType == ProgramType.FLOW, "Only FLOW process type is supported.");
    Preconditions.checkNotNull(flowSpec, "Missing FlowSpecification for %s", program.getName());

    for (FlowletDefinition flowletDefinition : flowSpec.getFlowlets().values()) {
View Full Code Here

Examples of co.cask.tigon.app.program.ProgramType

  @Override
  protected ProgramController launch(Program program, ProgramOptions options,
                                     File hConfFile, File cConfFile, ApplicationLauncher launcher) {
    // Extract and verify parameters
    FlowSpecification flowSpec = program.getSpecification();
    ProgramType processorType = program.getType();
    Preconditions.checkNotNull(processorType, "Missing processor type.");
    Preconditions.checkArgument(processorType == ProgramType.FLOW, "Only FLOW process type is supported.");

    try {
      Preconditions.checkNotNull(flowSpec, "Missing FlowSpecification for %s", program.getName());
View Full Code Here

Examples of co.cask.tigon.app.program.ProgramType

      String runIdOption = options.getArguments().getOption(ProgramOptionConstants.RUN_ID);
      Preconditions.checkNotNull(runIdOption, "Missing runId");
      RunId runId = RunIds.fromString(runIdOption);

      FlowSpecification flowSpec = program.getSpecification();
      ProgramType processorType = program.getType();
      Preconditions.checkNotNull(processorType, "Missing processor type.");
      Preconditions.checkArgument(processorType == ProgramType.FLOW, "Only FLOW process type is supported.");

      String processorName = program.getName();
      Preconditions.checkNotNull(processorName, "Missing processor name.");
View Full Code Here

Examples of gwtappcontainer.shared.apps.insight.ProgramType

  public static ProgramType get(String programTypeName) {
       
      try {
        String sql = "select program_type_id, program_type from program_types where program_type = ?";           
          
            ProgramType programType = null;
          
            try (Connection connection = DriverManager.getConnection(Utils.getCloudSqlURL())) {                  
                try (PreparedStatement ps = connection.prepareStatement(sql)) {                      
                    ps.setString(1, programTypeName.toLowerCase());
                   
                    try (ResultSet resultSet = ps.executeQuery()) {                     
                        while (resultSet.next()) {                         
                        programType = new ProgramType();
                        programType.id = resultSet.getInt(1);
                        programType.name = resultSet.getString(2);                                                                                                         
                        }
                    }                                       
                }
View Full Code Here

Examples of gwtappcontainer.shared.apps.insight.ProgramType

               
                 ps.executeUpdate();                
             }
         }
       
         ProgramType programType = get(programTypeName);     
         return programType;
        
     } catch (Exception ex) {
         throw new RuntimeException(ex);
     }             
View Full Code Here

Examples of gwtappcontainer.shared.apps.insight.ProgramType

     }             
   }

  public static void delete(String programTypeName) {
        
       ProgramType programType = get(programTypeName);
     
       if (null == programType)
           throw new APIException(Status.ERROR_RESOURCE_DOES_NOT_EXIST,
                           "Program type [" + programTypeName + "] does not exist");
                                             
View Full Code Here

Examples of gwtappcontainer.shared.apps.insight.ProgramType

                            
              try (PreparedStatement ps = connection.prepareStatement(sql)) {                                     
                
                try (ResultSet resultSet = ps.executeQuery()) {                                       
                    while (resultSet.next()) {
                      ProgramType programType = new ProgramType();
                      programType.id = resultSet.getInt(1);
                      programType.name = resultSet.getString(2);
                     
                        all.add(programType);
                    }
View Full Code Here

Examples of gwtappcontainer.shared.apps.insight.ProgramType

              throw new RuntimeException(ex);
      }
  }

  public static ProgramType addPractise(String programTypeName, String practiseName) {
    ProgramType programType = get(programTypeName);
    if (null == programType)
      throw new APIException(Status.ERROR_RESOURCE_DOES_NOT_EXIST,
          "Program type [" + programTypeName + "] does not exist");
   
    Practise practise = PractiseRepository.get(practiseName);
View Full Code Here

Examples of gwtappcontainer.shared.apps.insight.ProgramType

         throw new RuntimeException(ex);
     }                      
  }
 
  public static ProgramType deletePractise(String programTypeName, String practiseName) {
    ProgramType programType = get(programTypeName);
    if (null == programType)
      throw new APIException(Status.ERROR_RESOURCE_DOES_NOT_EXIST,
          "Program type [" + programTypeName + "] does not exist");
   
    Practise practise = PractiseRepository.get(practiseName);
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.