Examples of Driver


Examples of com.cloudera.flume.core.Driver

    AccumulatorSink ctr2 = (AccumulatorSink) ReportManager.get().getReportable(
        "count2");
    loopUntilCount(count, coll, coll2);

    // close off the collector
    Driver c1driver = coll.getDriver();
    Driver c2driver = coll2.getDriver();
    coll.close();
    coll2.close();

    // dump info for debugging
    Map<String, ReportEvent> rpts = new HashMap<String, ReportEvent>();
    agent.getReports(rpts);
    for (Entry<String, ReportEvent> e : rpts.entrySet()) {
      LOG.info(e.getKey() + " : " + e.getValue());
    }

    // check the end states
    assertEquals(count, ctr.getCount() + ctr2.getCount());
    assertTrue(ctr.getCount() > 0);
    assertTrue(ctr2.getCount() > 0);

    // the collector can be in ERROR or IDLE state because of the randomness.
    assertTrue("c1 failed to get to in IDLE state",
        c1driver.waitForAtLeastState(DriverState.IDLE, 1000));
    assertTrue("c2 failed to get to in IDLE state",
        c2driver.waitForAtLeastState(DriverState.IDLE, 1000));

    //
    // NodeState stateColl = coll.getStatus().state;
    // LOG.info("coll exited in state: " + stateColl);
    // assertTrue(stateColl.equals(NodeState.IDLE)
View Full Code Here

Examples of com.facebook.presto.operator.Driver

        // create drivers
        List<Driver> drivers = new ArrayList<>();
        Map<PlanNodeId, Driver> driversBySource = new HashMap<>();
        for (DriverFactory driverFactory : localExecutionPlan.getDriverFactories()) {
            DriverContext driverContext = taskContext.addPipelineContext(driverFactory.isInputDriver(), driverFactory.isOutputDriver()).addDriverContext();
            Driver driver = driverFactory.createDriver(driverContext);
            drivers.add(driver);
            for (PlanNodeId sourceId : driver.getSourceIds()) {
                driversBySource.put(sourceId, driver);
            }
            driverFactory.close();
        }

        // add sources to the drivers
        for (TaskSource source : sources) {
            for (Driver driver : driversBySource.values()) {
                driver.updateSource(source);
            }
        }

        return ImmutableList.copyOf(drivers);
    }
View Full Code Here

Examples of com.github.youtube.vitess.jdbc.bson.Driver

    }

    Connection connection = null;
    try {
      // Loading and registering Driver in DriverManager
      new Driver();
      connection = DriverManager.getConnection("jdbc:vtocc://" + options.server);
    } catch (SQLException | RuntimeException e) {
      logger.error("client error: ", e);
      System.exit(1);
    }
View Full Code Here

Examples of com.google.k2crypto.storage.driver.Driver

   * @param address URI address to open.
   * @param reason Reason the address is rejected.
   */
  protected void checkRejectAddress(
      URI address, IllegalAddressException.Reason reason) {
    Driver driver = newDriver();
    try {
      driver.open(address);
      fail("Should reject " + address);
    } catch (StoreException ex) {
      throw new AssertionError("Unexpected", ex);
    } catch (IllegalAddressException expected) {
      assertEquals(reason, expected.getReason());
      assertEquals(address.toString(), expected.getAddress());
    } finally {
      driver.close();
    }
  }
View Full Code Here

Examples of com.hardcode.driverManager.Driver

  }

  @Override
  public DataSource createDataSource(String tableName, String tableAlias, String driverName) throws DataSourceCreationException {

        Driver d = getDataSourceFactory().getDriverManager().getDriver(driverName);
        ((GDBMSDriver)d).setDataSourceFactory(getDataSourceFactory());

        DBSpatialDataSourceAdapter adapter = new DBSpatialDataSourceAdapter(tableName, tableAlias,
                (DBSpatialSource) def, (SpatialDBDriver) d);
        adapter.setDataSourceFactory(getDataSourceFactory());
View Full Code Here

Examples of com.massivecraft.mcore.store.Driver

      msg("<b>could not get the to-database.");
      return;
    }
   
    // Prepare
    final Driver fromDriver = fromDb.getDriver();
    final Driver toDriver = toDb.getDriver();
   
    Set<String> collnames = fromDb.getCollnames();
   
    // Statistics
    int countCollCurrent = 0;
    int countCollTotal = collnames.size();
   
    // Do it!
    long before = System.currentTimeMillis();
    msg("<i>Now copying database with <h>%d <i>collections.", countCollTotal);
    for (String collname : fromDb.getCollnames())
    {
      countCollCurrent++;
      final Coll<?> fromColl = new Coll<Object>(collname, Object.class, fromDb, MCore.get());
      final Coll<?> toColl = new Coll<Object>(collname, Object.class, toDb, MCore.get());
     
      Collection<String> ids = fromDriver.getIds(fromColl);
      msg("<i>Now copying collection <h>%d/%d %s <i>with <h>%d <i>documents.", countCollCurrent, countCollTotal, collname, ids.size());
      for (String id : ids)
      {
        Entry<JsonElement, Long> data = fromDriver.load(fromColl, id);
        toDriver.save(toColl, id, data.getKey());
      }
    }
    long after = System.currentTimeMillis();
    long duration = after - before;
    msg("<g>The copy is now complete. <i>It took <h>%dms<i>.", duration);
View Full Code Here

Examples of com.mysql.jdbc.Driver

    @Before
    public void setup() throws Exception
    {
        new CreateDatabase(URL, USERNAME, PASSWORD).execute();

        DataSource dataSource = new SimpleDriverDataSource(new Driver(), URL, USERNAME, PASSWORD);
        migrationManager = new DataSourceMigrationManager(dataSource);
        migrationManager.setMigrationResolver(new ResourceMigrationResolver("classpath:/test_migrations/mysql_50/"));

        jdbcTemplate = new SimpleJdbcTemplate(dataSource);
    }
View Full Code Here

Examples of com.sun.msv.generator.Driver

       */
    public void runTest() throws Exception {

            System.out.println(schemaFile.getPath());
           
      Driver driver = new Driver()// generator instance.
       
      // parse parameters
      driver.parseArguments(new String[]{"-seed","0", "-n","30", "-quiet"});
       
      // parse example documents
            Iterator itr = examples.iterator();
      while( itr.hasNext() ) {
        File example = (File)itr.next();
               
                reader.setContentHandler( new ExampleReader(driver.exampleTokens) );
                reader.parse( com.sun.msv.util.Util.getInputSource(example.getAbsolutePath()) );
      }
       
      // set the grammar
      ISchema schema = validator.parseSchema(schemaFile);
      assertNotNull( "failed to parse the schema", schema );
      driver.grammar = schema.asGrammar();
      driver.outputName = "NUL";
       
      // run the test
      assertEquals( "generator for "+schemaFile.getName(), driver.run(System.out), 0 );
       
       
      // parse additional parameter
      // generally, calling the parseArguments method more than once
      // is not supported. So this is a hack.
      driver.parseArguments(new String[]{"-error","10/100"});

      assertEquals( "generator for "+schemaFile.getName(), driver.run(System.out), 0 );
    }
View Full Code Here

Examples of com.thaiopensource.relaxng.translate.Driver

        return xsds;
    }

    private void runTrang(File outputFile) {
        String[] args = createArgs(outputFile);
        Driver trang = new Driver();
        trang.run(args);
    }
View Full Code Here

Examples of com.tobedevoured.modelcitizen.model.Driver

        modelFactory.registerBlueprint(driverBlueprint);
    }

    @Test
    public void testDriverNameIsForced() throws CreateModelException {
        Driver driver = new Driver();
        driver.setName("Test Name");
        driver = modelFactory.createModel(Driver.class);

        assertEquals("Driver name is a forced default", "Lev the Driver", driver.getName());
    }
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.