Examples of nextRecord()


Examples of co.cask.cdap.api.data.batch.RecordScanner.nextRecord()

        if (!initialized.get()) {
          initialize();
        }

        try {
          boolean retVal = recordScanner.nextRecord();
          if (retVal) {
            value.set(recordScanner.getCurrentRecord());
          }
          return retVal;
        } catch (InterruptedException e) {
View Full Code Here

Examples of com.linuxense.javadbf.DBFReader.nextRecord()

    DBFField field0 = reader.getField(0);
    assertEquals("code", field0.getName());
    DBFField field1 = reader.getField(1);
    assertEquals("name", field1.getName());
    Object[] rowObjects;
    while ((rowObjects = reader.nextRecord()) != null) {

      for (int i = 0; i < rowObjects.length; i++) {

        System.out.println(rowObjects[i]);
      }
View Full Code Here

Examples of com.mapr.storm.streamparser.StreamParser.nextRecord()

        StreamParser parser = factory.createParser(new FileInputStream(file));

        assertTrue(file.length() > 30);

        assertEquals(0, parser.currentOffset());
        List<Object> t = parser.nextRecord();

        assertEquals(2, t.size());
        assertEquals("test", t.get(0));
        assertEquals("1", t.get(1));
View Full Code Here

Examples of com.mapr.storm.streamparser.StreamParser.nextRecord()

        assertEquals(2, t.size());
        assertEquals("test", t.get(0));
        assertEquals("1", t.get(1));

        t = parser.nextRecord();

        assertEquals(2, t.size());
        assertEquals("test", t.get(0));
        assertEquals("2", t.get(1));
View Full Code Here

Examples of com.mapr.storm.streamparser.StreamParser.nextRecord()

        assertEquals("2", t.get(1));

        // time critical section starts here ... delay > 50ms can cause failure

        // first read doesn't see a full record and thus returns null
        t = parser.nextRecord();
        assertNull(t);

        // write the remainder now
        out.write(bytes, 6, bytes.length - 6);
View Full Code Here

Examples of com.mapr.storm.streamparser.StreamParser.nextRecord()

        // write the remainder now
        out.write(bytes, 6, bytes.length - 6);

        // so that the repeated read succeeds
        t = parser.nextRecord();
        // end of time critical section

        assertEquals(2, t.size());
        assertEquals("test", t.get(0));
        assertEquals("3", t.get(1));
View Full Code Here

Examples of com.mapr.storm.streamparser.StreamParser.nextRecord()

        assertEquals(2, t.size());
        assertEquals("test", t.get(0));
        assertEquals("3", t.get(1));

        assertNull(parser.nextRecord());

        out.close();
    }

    @Test
View Full Code Here

Examples of com.sforce.async.CSVReader.nextRecord()

      IOException {
    // batchInfoList was populated when batches were created and submitted
    for (BatchInfo b : batchInfoList) {
      CSVReader rdr = new CSVReader(connection.getBatchResultStream(
          job.getId(), b.getId()));
      List<String> resultHeader = rdr.nextRecord();
      int resultCols = resultHeader.size();
      List<String> row;
      while ((row = rdr.nextRecord()) != null) {
        Map<String, String> resultInfo = new HashMap<String, String>();
        for (int i = 0; i < resultCols; i++) {
View Full Code Here

Examples of com.sforce.async.CSVReader.nextRecord()

      CSVReader rdr = new CSVReader(connection.getBatchResultStream(
          job.getId(), b.getId()));
      List<String> resultHeader = rdr.nextRecord();
      int resultCols = resultHeader.size();
      List<String> row;
      while ((row = rdr.nextRecord()) != null) {
        Map<String, String> resultInfo = new HashMap<String, String>();
        for (int i = 0; i < resultCols; i++) {
          resultInfo.put(resultHeader.get(i), row.get(i));
        }
        boolean success = Boolean.valueOf(resultInfo.get("Success"));
View Full Code Here

Examples of com.sforce.async.CSVReader.nextRecord()

    private void validateExtraction(final String name, final Map<String, String> testConfig) throws IOException {
        FileInputStream fis = new FileInputStream(new File(testConfig.get(Config.DAO_NAME)));
        try {
            CSVReader rdr = new CSVReader(fis, "UTF-8");
            int nameidx = rdr.nextRecord().indexOf("NAME");
            assertEquals(name, rdr.nextRecord().get(nameidx));
        } finally {
            IOUtils.closeQuietly(fis);
        }
    }
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.