Examples of readFields()


Examples of edu.umd.hooka.alignment.hmm.ATable.readFields()

    org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration(job);
    FileSystem fileSys = FileSystem.get(conf);

    DataInput in = new DataInputStream(new BufferedInputStream(fileSys.open(path)));
    ATable at = new ATable();
    at.readFields(in);

    return at;
  }

  static public Vocab loadVocab(Path path, Configuration job) throws IOException {
View Full Code Here

Examples of edu.umd.hooka.ttables.TTable_monolithic_IFAs.readFields()

    org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
    FileSystem fileSys = FileSystem.get(conf);
 
    DataInput in = new DataInputStream(new BufferedInputStream(fileSys.open(path)));
    TTable_monolithic_IFAs tt = new TTable_monolithic_IFAs();
    tt.readFields(in);
   
    return tt;
  }
 
  public static class M1ViterbiMapper extends MapReduceBase
View Full Code Here

Examples of gc.gpt.db.GptResource.readFields()

  private void _handleSqlRow(TaskContext context, Connection con,
      ResultSet rs, long rowNum) throws Exception {
    TaskStats stats = context.getStats();
    String tn = context.getTaskName()+".sync";
    GptResource resource = new GptResource();
    resource.readFields(rs);

    String[] result = queryDoc(resource);
    String id = result[0];
    String fsMatched = result[1];
   
View Full Code Here

Examples of hipi.image.FloatImage.readFields()

      /* DistributedCache will be deprecated in 0.21 */
      Path file = DistributedCache.getLocalCacheFiles(job.getConfiguration())[0];
      FSDataInputStream dis = FileSystem.getLocal(job.getConfiguration()).open(file);
      dis.skip(4);
      FloatImage image = new FloatImage();
      image.readFields(dis);
      mean = image.getData();
    }

    public void map(ImageHeader key, FloatImage value, Context context)
        throws IOException, InterruptedException {
View Full Code Here

Examples of it.eng.spagobi.engines.qbe.query.SQLFieldsReader.readFields()

      logger.debug("Executable SQL query: [" + sqlQuery + "]");
     
      logger.debug("Exctracting fields ...");
      fieldsReader = new SQLFieldsReader(sqlQuery, transaction.getSQLConnection());
      try {
        extractedFields = fieldsReader.readFields();
      } catch (Exception e) {
        logger.debug("Impossible to extract fields from query");
        throw new SpagoBIEngineException("Impossible to extract fields from query: " + jpaQueryStr, e);
      }
      logger.debug("Fields extracted succesfully");
View Full Code Here

Examples of ivory.core.data.dictionary.PrefixEncodedLexicographicallySortedDictionary.readFields()

    FileSystem fs = FileSystem.getLocal(new Configuration());
    PrefixEncodedLexicographicallySortedDictionary dictionary =
        new PrefixEncodedLexicographicallySortedDictionary();

    FSDataInputStream in = fs.open(new Path("etc/trec-index-terms.dat"));
    dictionary.readFields(in);
    in.close();

    assertEquals(312232, dictionary.size());
    // Note: termids start at 0;
    assertEquals("0", dictionary.getTerm(0));
View Full Code Here

Examples of net.nutch.io.UTF8.readFields()

          Call call = (Call)calls.remove(new Integer(id));
          boolean isError = in.readBoolean();     // read if error
          if (isError) {
            UTF8 utf8 = new UTF8();
            utf8.readFields(in);                  // read error string
            call.error = utf8.toString();
            call.value = null;
          } else {
            Writable value = makeValue();
            value.readFields(in);                 // read value
View Full Code Here

Examples of net.nutch.io.Writable.readFields()

            utf8.readFields(in);                  // read error string
            call.error = utf8.toString();
            call.value = null;
          } else {
            Writable value = makeValue();
            value.readFields(in);                 // read value
            call.value = value;
            call.error = null;
          }
          call.callComplete();                   // deliver result to caller
        }
View Full Code Here

Examples of org.apache.accumulo.core.bloomfilter.DynamicBloomFilter.readFields()

           
            /**
             * read in bloom filter
             */
           
            tmpBloomFilter.readFields(in);
            // only set the bloom filter after it is fully constructed
            bloomFilter = tmpBloomFilter;
          } catch (NoSuchMetaStoreException nsme) {
            // file does not have a bloom filter, ignore it
          } catch (IOException ioe) {
View Full Code Here

Examples of org.apache.accumulo.core.client.BatchWriterConfig.readFields()

    if (serialized == null || serialized.isEmpty()) {
      return bwConfig;
    } else {
      try {
        ByteArrayInputStream bais = new ByteArrayInputStream(serialized.getBytes(Charset.forName("UTF-8")));
        bwConfig.readFields(new DataInputStream(bais));
        bais.close();
        return bwConfig;
      } catch (IOException e) {
        throw new IllegalArgumentException("unable to serialize " + BatchWriterConfig.class.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.