Package org.apache.flink.configuration

Examples of org.apache.flink.configuration.Configuration


      outputConfig.setInputSerializer(serializer, 0);

      outputConfig.setStubWrapper(new UserCodeClassWrapper<CsvOutputFormat>(CsvOutputFormat.class));
      outputConfig.setStubParameter(FileOutputFormat.FILE_PARAMETER_KEY, resultPath);

      Configuration outputUserConfig = outputConfig.getStubParameters();
      outputUserConfig.setString(CsvOutputFormat.RECORD_DELIMITER_PARAMETER, "\n");
      outputUserConfig.setString(CsvOutputFormat.FIELD_DELIMITER_PARAMETER, " ");
      outputUserConfig.setClass(CsvOutputFormat.FIELD_TYPE_PARAMETER_PREFIX + 0, LongValue.class);
      outputUserConfig.setInteger(CsvOutputFormat.RECORD_POSITION_PARAMETER_PREFIX + 0, 0);
      outputUserConfig.setClass(CsvOutputFormat.FIELD_TYPE_PARAMETER_PREFIX + 1, LongValue.class);
      outputUserConfig.setInteger(CsvOutputFormat.RECORD_POSITION_PARAMETER_PREFIX + 1, 1);
      outputUserConfig.setInteger(CsvOutputFormat.NUM_FIELDS_PARAMETER, 2);
    }

    return output;
  }
View Full Code Here


  public static Collection<Object[]> getConfigurations() throws FileNotFoundException, IOException {

    LinkedList<Configuration> tConfigs = new LinkedList<Configuration>();

    for(int i=1; i <= NUM_PROGRAMS; i++) {
      Configuration config = new Configuration();
      config.setInteger("ProgramId", i);
      tConfigs.add(config);
    }
   
    return toParameterList(tConfigs);
  }
View Full Code Here

    }
  }
 
  private List<OperatorDescriptorDual> getDataProperties(JoinOperatorBase<?, ?, ?, ?> joinOperatorBase, JoinHint joinHint) {
    // see if an internal hint dictates the strategy to use
    Configuration conf = joinOperatorBase.getParameters();
    String localStrategy = conf.getString(PactCompiler.HINT_LOCAL_STRATEGY, null);

    if (localStrategy != null) {
      final OperatorDescriptorDual fixedDriverStrat;
      if (PactCompiler.HINT_LOCAL_STRATEGY_SORT_BOTH_MERGE.equals(localStrategy) ||
        PactCompiler.HINT_LOCAL_STRATEGY_SORT_FIRST_MERGE.equals(localStrategy) ||
View Full Code Here

    compareResultsByLinesInMemory(EXPECTED, resultPath);
  }

  @Parameters
  public static Collection<Object[]> getConfigurations() {
    Configuration config = new Configuration();
    config.setInteger("NumSubtasks", DOP);
    return toParameterList(config);
  }
View Full Code Here

  public static Collection<Object[]> getConfigurations() throws FileNotFoundException, IOException {

    LinkedList<Configuration> tConfigs = new LinkedList<Configuration>();

    for(int i=1; i <= NUM_PROGRAMS; i++) {
      Configuration config = new Configuration();
      config.setInteger("ProgramId", i);
      tConfigs.add(config);
    }
   
    return toParameterList(tConfigs);
  }
View Full Code Here

  public static Collection<Object[]> getConfigurations() throws FileNotFoundException, IOException {

    LinkedList<Configuration> tConfigs = new LinkedList<Configuration>();

    for(int i=1; i <= NUM_PROGRAMS; i++) {
      Configuration config = new Configuration();
      config.setInteger("ProgramId", i);
      tConfigs.add(config);
    }
   
    return toParameterList(tConfigs);
  }
View Full Code Here

        new Object[]{4, true, false, false, 8, 4},
        new Object[]{4, true, false, false, 16, 8},
    };

    for (Object[] p : configParams) {
      Configuration config = new Configuration();
      config.setInteger(DATA_VOLUME_GB_CONFIG_KEY, (Integer) p[0]);
      config.setBoolean(USE_FORWARDER_CONFIG_KEY, (Boolean) p[1]);
      config.setBoolean(IS_SLOW_SENDER_CONFIG_KEY, (Boolean) p[2]);
      config.setBoolean(IS_SLOW_RECEIVER_CONFIG_KEY, (Boolean) p[3]);
      config.setInteger(PARALLELISM_CONFIG_KEY, (Integer) p[4]);
      config.setInteger(NUM_SLOTS_PER_TM_CONFIG_KEY, (Integer) p[5]);

      TestBaseWrapper test = new TestBaseWrapper(config);

      test.startCluster();
      try {
View Full Code Here

  public static Collection<Object[]> getConfigurations() throws FileNotFoundException, IOException {

    LinkedList<Configuration> tConfigs = new LinkedList<Configuration>();

    for(int i=1; i <= NUM_PROGRAMS; i++) {
      Configuration config = new Configuration();
      config.setInteger("ProgramId", i);
      tConfigs.add(config);
    }
   
    return toParameterList(tConfigs);
  }
View Full Code Here

      String jarFile = JAR_FILE;
      String testData = getClass().getResource(TEST_DATA_FILE).toString();
     
      PackagedProgram program = new PackagedProgram(new File(jarFile), new String[] { testData });
           
      Client c = new Client(new InetSocketAddress("localhost", testMiniCluster.getJobManagerRpcPort()), new Configuration(), program.getUserCodeClassLoader());
      c.run(program, 4, true);
    }
    catch (Throwable t) {
      System.err.println(t.getMessage());
      t.printStackTrace();
View Full Code Here

  public void testReadNoPosAll() throws IOException {
    try {
      final String fileContent = "111|222|333|444|555\n666|777|888|999|000|";
      final FileInputSplit split = createTempFile(fileContent)
   
      final Configuration parameters = new Configuration();
     
      format.setFieldDelimiter('|');
      format.setFieldTypesGeneric(IntValue.class, IntValue.class, IntValue.class, IntValue.class, IntValue.class);
     
      format.configure(parameters);
View Full Code Here

TOP

Related Classes of org.apache.flink.configuration.Configuration

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.