Examples of create()


Examples of com.cloudera.cdk.data.DatasetRepository.create()

    // Create the dataset
    DatasetRepository repo = DatasetRepositories.open(datasetUri);
    DatasetDescriptor datasetDescriptor = new DatasetDescriptor.Builder()
        .schema(schema).build();
    Dataset<Object> dataset = repo.create(datasetName, datasetDescriptor);

    // Run the job
    final String schemaString = schema.toString();
    AvroType<GenericData.Record> outputType = Avros.generics(schema);
    PCollection<String> lines = readTextFile(input);

Examples of com.cloudera.cdk.data.MetadataProvider.create()

        .getMetadataProvider();
    Assert.assertTrue("Repo is using a HCatalogExternalMetadataProvider",
        provider instanceof HCatalogExternalMetadataProvider);

    // verify location
    DatasetDescriptor created = provider.create("test",
        new DatasetDescriptor.Builder()
        .schemaLiteral("\"string\"")
        .build());
    Assert.assertEquals("Location should be in HDFS",
        "hdfs", created.getLocation().getScheme());

Examples of com.cloudera.cdk.data.hbase.HBaseDatasetRepository.create()

    String testGenericEntity = AvroUtils.inputStreamToString(
        HBaseDatasetRepositoryTest.class.getResourceAsStream("/TestGenericEntity.avsc"));
    DatasetDescriptor descriptor = new DatasetDescriptor.Builder()
        .schemaLiteral(testGenericEntity)
        .build();
    dataset = repo.create("testtable", descriptor);
    for (int i = 0; i < 10; i++) {
      dataset.put(HBaseDatasetRepositoryTest.createGenericEntity(i));
    }
  }

Examples of com.cloudera.flume.conf.SinkFactory.SinkBuilder.create()

    conf.set(FlumeConfiguration.COLLECTOR_DFS_COMPRESS_CODEC, codecName);

    // build a sink that outputs to that format.
    File f = FileUtil.mktempdir();
    SinkBuilder builder = EscapedCustomDfsSink.builder();
    EventSink snk = builder.create(new Context(), "file:///" + f.getPath()
        + "/sub-%{service}");
    Event e = new EventImpl("this is a test message".getBytes());
    Attributes.setString(e, "service", "foo");
    snk.open();
    snk.append(e);

Examples of com.cloudera.kitten.ContainerLaunchContextFactory.create()

    this.applicationId = appContext.getApplicationId();
    appContext.setApplicationName(parameters.getApplicationName());
   
    // Setup the container for the application master.
    ContainerLaunchParameters appMasterParams = parameters.getApplicationMasterParameters(applicationId);
    ContainerLaunchContext clc = clcFactory.create(appMasterParams);
    appContext.setResource(clcFactory.createResource(appMasterParams));
    appContext.setAMContainerSpec(clc);
    appContext.setQueue(parameters.getQueue());
    appContext.setPriority(clcFactory.createPriority(appMasterParams.getPriority()));
    submitApplication(appContext);

Examples of com.cloudhopper.commons.sql.adapter.DataSourceAdapter.create()

            //throw new SQLConfigurationException("Invalid DataSourceAdapter class specified. Should be impossible error?");
            throw new SQLMissingDependencyException("DataSourceAdapter '" + adapterClass + "' failed to load. Perhaps missing jar file?", e);
        }

        // delegate creating the new datasource to the adapter
        ManagedDataSource mds = adapter.create(config);

        // if the user requested this datasource to be added to jmx
        if (config.getJmx()) {
            // hmm... if jmx is turned on, let's register the MBean
            MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();

Examples of com.cloudtasks.shared.CloudTasksRequest.create()

  /**
   * Send a task to the server.
   */
  private void sendNewTaskToServer(String message) {
    CloudTasksRequest request = requestFactory.cloudTasksRequest();
    TaskProxy task = request.create(TaskProxy.class);
    int len = Math.min(message.length(), 50);
    if (len != message.length()) {
      message = message.substring(0, len);
      message = message + "...";
    }

Examples of com.commander4j.db.JDBArchive.create()

            archID = JOptionPane.showInputDialog(Common.mainForm, lang.get("dlg_Archive_ID_Input"));
            if (archID != null) {
              if (archID.equals("") == false) {
                archID = archID.toUpperCase();
                arch.clear();
                if (arch.create(archID) == false) {
                  JUtility.errorBeep();
                  JOptionPane.showMessageDialog(Common.mainForm, arch.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE);
                } else {
                  arch.update();
                  populateList("");

Examples of com.commander4j.db.JDBAutoLabellerResources.create()

              {
                if (listAllResources.isSelectedIndex(j))
                {
                  String item = (String) listAllResources.getModel().getElementAt(j);
                  JDBAutoLabellerResources po = new JDBAutoLabellerResources(Common.selectedHostID, Common.sessionID);
                  po.create(jTextFieldType.getText(),comboBox4jGroup.getSelectedItem().toString() ,item);
                }
              }
              populateListAssignedResources(jTextFieldType.getText(),comboBox4jGroup.getSelectedItem().toString(),"");
              populateListAllResources();
              jButtonUpdate.setEnabled(true);

Examples of com.commander4j.db.JDBControl.create()

            if (systemKey != null)
            {
              if (systemKey.equals("") == false)
              {
                systemKey = systemKey.toUpperCase();
                if (ctl.create(systemKey, "", "") == false)
                {
                  JUtility.errorBeep();
                  JOptionPane.showMessageDialog(Common.mainForm, ctl.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE);
                }
                else
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.