Examples of reset()


Examples of org.apache.hadoop.hbase.rest.filter.GZIPResponseWrapper.reset()

    GZIPResponseWrapper test = new GZIPResponseWrapper(response);

    ServletOutputStream servletOutput = test.getOutputStream();
    assertEquals(org.apache.hadoop.hbase.rest.filter.GZIPResponseStream.class,
        servletOutput.getClass());
    test.reset();
    verify(response).setHeader("Content-Encoding", null);

    when(response.isCommitted()).thenReturn(true);
    servletOutput = test.getOutputStream();
    assertEquals(out.getClass(), servletOutput.getClass());
View Full Code Here

Examples of org.apache.hadoop.hdfs.metrics.LookasideMetrics.LocalMetrics.reset()

    long evictPercent = 20;
    conf.setLong(LookasideCache.CACHESIZE, maxSize);
    conf.setLong(LookasideCache.CACHEEVICT_PERCENT,  evictPercent);
    LookasideCache cache = new LookasideCache(conf);
    LocalMetrics metrics = LookasideCache.getLocalMetrics();
    metrics.reset();

    assertTrue(cache.getCacheMaxSize() == maxSize);
    assertTrue(cache.getCacheSize() == 0);
    assertTrue(cache.getCacheEvictPercent() == evictPercent);
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager.reset()

   */
  void reloadFromImageFile(File file) throws IOException {
    namesystem.dir.reset();
    DelegationTokenSecretManager man = namesystem.getDelegationTokenSecretManager();
    if (man != null) {
      man.reset();
    }

    LOG.debug("Reloading namespace from " + file);
    loadFSImage(file);
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.vector.LongColumnVector.reset()

        result = new LongColumnVector();
      } else {
        result = (LongColumnVector) previousVector;
      }

      result.reset();
      Object obj = null;
      for (int i = 0; i < batchSize; i++) {
        obj = next(obj);
        if (obj == null) {
          result.noNulls = false;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.reset()

    Mode m = Mode.COMPLETE;
    ObjectInspector outputOi = udafEvaluator.init(m, inputOiList);
   
    Object[] parameters = new Object[] { null , 12 };
    AggregationBuffer agg = udafEvaluator.getNewAggregationBuffer();
    udafEvaluator.reset(agg);
    udafEvaluator.iterate(agg, parameters);
    Object result = udafEvaluator.terminate(agg);
   
    LOG.info("result = " + result);
   
View Full Code Here

Examples of org.apache.hadoop.hive.ql.udf.xml.UDFXPathUtil.ReusableStringReader.reset()

     
      read = reader.read(cc);
      assertEquals(6, read);
      assertEquals("brown ", new String(cc));
     
      reader.reset();
      read = reader.read(cc);
      assertEquals(6, read);
      assertEquals("brown ", new String(cc));
    }
    reader.close();
View Full Code Here

Examples of org.apache.hadoop.io.BoundedByteArrayOutputStream.reset()

    writer = new InMemoryWriter(bout);
    writeTestFileUsingDataBuffer(writer, false, false, data, null);
    readUsingInMemoryReader(bout.getBuffer(), data);

    //No RLE, RepeatKeys, no compression
    bout.reset();
    writer = new InMemoryWriter(bout);
    writeTestFileUsingDataBuffer(writer, false, true, data, null);
    readUsingInMemoryReader(bout.getBuffer(), data);

    //RLE, No RepeatKeys, no compression
View Full Code Here

Examples of org.apache.hadoop.io.DataInputBuffer.reset()

    DataOutputBuffer dataOutputBuffer = new DataOutputBuffer();
    WritableHelper.writeInstance(dataOutputBuffer, expression);

    DataInputBuffer dataInputBuffer = new DataInputBuffer();
    dataInputBuffer.reset(dataOutputBuffer.getData(), dataOutputBuffer.getLength());

    Expression clonedExpression = WritableHelper.readInstance(dataInputBuffer, Expression.class);

    Assert.assertEquals("The expression was not the same after being written and read", expression, clonedExpression);
  }
View Full Code Here

Examples of org.apache.hadoop.io.DataInputByteBuffer.reset()

      throws IOException {
    Credentials credentials = new Credentials();
    DataInputByteBuffer dibb = new DataInputByteBuffer();
    ByteBuffer tokens = application.getAMContainerSpec().getTokens();
    if (tokens != null) {
      dibb.reset(tokens);
      credentials.readTokenStorageStream(dibb);
      tokens.rewind();
    }
    return credentials;
  }
View Full Code Here

Examples of org.apache.hadoop.io.DataOutputBuffer.reset()

      DataOutputBuffer valOut = new DataOutputBuffer();
      while (resultIter.next()) {
        keyIn.reset(resultIter.getKey().getData(),
                    resultIter.getKey().getLength());
        key.readFields(keyIn);
        valOut.reset();
        (resultIter.getValue()).writeUncompressedBytes(valOut);
        valIn.reset(valOut.getData(), valOut.getLength());
        value.readFields(valIn);
        writer.append(key, value);
        reporter.progress();
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.