Package org.apache.tez.runtime.common.objectregistry

Examples of org.apache.tez.runtime.common.objectregistry.ObjectRegistry


      vertexName = conf.get(
          org.apache.tez.mapreduce.hadoop.MRJobConfig.VERTEX_NAME);

      TaskAttemptID taId = context.getTaskAttemptID();

      ObjectRegistry objectRegistry = ObjectRegistryFactory.getObjectRegistry();
      String fooBarVal = (String) objectRegistry.get("FooBar");
      if (null == fooBarVal) {
        LOG.info("Adding FooBar key to Object cache");
        objectRegistry.add(ObjectLifeCycle.DAG,
            "FooBar", "BarFooFromTask" + taId.getTaskID().toString());
      } else {
        LOG.info("Got FooBar val from Object cache"
            + ", currentTaskId=" + taId.getTaskID().toString()
            + ", val=" + fooBarVal);
View Full Code Here


      vertexName = conf.get(
          org.apache.tez.mapreduce.hadoop.MRJobConfig.VERTEX_NAME);

      TaskAttemptID taId = context.getTaskAttemptID();

      ObjectRegistry objectRegistry = ObjectRegistryFactory.getObjectRegistry();
      String fooBarVal = (String) objectRegistry.get("FooBar");
      if (null == fooBarVal) {
        LOG.info("Adding FooBar key to Object cache");
        objectRegistry.add(ObjectLifeCycle.DAG,
            "FooBar", "BarFooFromTask" + taId.getTaskID().toString());
      } else {
        LOG.info("Got FooBar val from Object cache"
            + ", currentTaskId=" + taId.getTaskID().toString()
            + ", val=" + fooBarVal);
View Full Code Here

      vertexName = conf.get(
          org.apache.tez.mapreduce.hadoop.MRJobConfig.VERTEX_NAME);

      TaskAttemptID taId = context.getTaskAttemptID();

      ObjectRegistry objectRegistry = ObjectRegistryFactory.getObjectRegistry();
      String fooBarVal = (String) objectRegistry.get("FooBar");
      if (null == fooBarVal) {
        LOG.info("Adding FooBar key to Object cache");
        objectRegistry.add(ObjectLifeCycle.DAG,
            "FooBar", "BarFooFromTask" + taId.getTaskID().toString());
      } else {
        LOG.info("Got FooBar val from Object cache"
            + ", currentTaskId=" + taId.getTaskID().toString()
            + ", val=" + fooBarVal);
View Full Code Here

  }

  @Test
  public void testBasicCRUD() {
    ObjectRegistry objectRegistry =
        ObjectRegistryFactory.getObjectRegistry();
    testCRUD(objectRegistry);
  }
View Full Code Here

    testCRUD(objectRegistry);
  }

  @Test
  public void testClearCache() {
    ObjectRegistry objectRegistry = new ObjectRegistryImpl();
    testCRUD(objectRegistry);

    String one = "one";
    String two = "two";
    objectRegistry.add(ObjectLifeCycle.VERTEX, one, one);
    objectRegistry.add(ObjectLifeCycle.DAG, two, two);

    ((ObjectRegistryImpl)objectRegistry).clearCache(ObjectLifeCycle.VERTEX);
    Assert.assertNull(objectRegistry.get(one));
    Assert.assertNotNull(objectRegistry.get(two));

    objectRegistry.add(ObjectLifeCycle.VERTEX, one, one);
    ((ObjectRegistryImpl)objectRegistry).clearCache(ObjectLifeCycle.DAG);
    Assert.assertNotNull(objectRegistry.get(one));
    Assert.assertNull(objectRegistry.get(two));
  }
View Full Code Here

TOP

Related Classes of org.apache.tez.runtime.common.objectregistry.ObjectRegistry

Copyright © 2018 www.massapicom. 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.