Examples of ResourceTracker


Examples of helma.framework.repository.ResourceTracker

    public synchronized void checkForUpdates() {
        boolean updatedResources = false;

        // check if any resource the prototype knows about has changed or gone
        for (Iterator i = trackers.values().iterator(); i.hasNext();) {
            ResourceTracker tracker = (ResourceTracker) i.next();

            try {
                if (tracker.hasChanged()) {
                    updatedResources = true;
                    // let tracker know we've seen the update
                    tracker.markClean();
                    // if resource has gone remove it
                    if (!tracker.getResource().exists()) {
                        i.remove();
                        String name = tracker.getResource().getName();
                        if (name.endsWith(TypeManager.skinExtension)) {
                            skins.remove(tracker.getResource());
                        } else {
                            code.remove(tracker.getResource());
                        }
                    }
                }
            } catch (IOException iox) {
                iox.printStackTrace();
View Full Code Here

Examples of helma.framework.repository.ResourceTracker

                    if (engine != null) {
                        engine.injectCodeResource(lowerCaseName, res);
                    }
                    code.add(res);
                }
                trackers.put(res.getName(), new ResourceTracker(res));
            }
        }
        return updated;
    }
View Full Code Here

Examples of org.apache.hadoop.yarn.server.api.ResourceTracker

 
 
  private void testPbServerFactory() {
    InetSocketAddress addr = new InetSocketAddress(0);
    Configuration conf = new Configuration();
    ResourceTracker instance = new ResourceTrackerTestImpl();
    Server server = null;
    try {
      server =
        RpcServerFactoryPBImpl.get().getServer(
            ResourceTracker.class, instance, addr, conf, null, 1);
View Full Code Here

Examples of org.apache.hadoop.yarn.server.api.ResourceTracker

 
  private void testPbClientFactory() {
    InetSocketAddress addr = new InetSocketAddress(0);
    System.err.println(addr.getHostName() + addr.getPort());
    Configuration conf = new Configuration();
    ResourceTracker instance = new ResourceTrackerTestImpl();
    Server server = null;
    try {
      server =
        RpcServerFactoryPBImpl.get().getServer(
            ResourceTracker.class, instance, addr, conf, null, 1);
      server.start();
      System.err.println(server.getListenerAddress());
      System.err.println(NetUtils.getConnectAddress(server));

      ResourceTracker client = null;
      try {
        client = (ResourceTracker) RpcClientFactoryPBImpl.get().getClient(ResourceTracker.class, 1, NetUtils.getConnectAddress(server), conf);
      } catch (YarnRuntimeException e) {
        e.printStackTrace();
        Assert.fail("Failed to create client");
View Full Code Here

Examples of org.apache.hadoop.yarn.server.api.ResourceTracker

              .getResourceTrackerService();
          final RecordFactory recordFactory =
            RecordFactoryProvider.getRecordFactory(null);

          // For in-process communication without RPC
          return new ResourceTracker() {

            @Override
            public NodeHeartbeatResponse nodeHeartbeat(
                NodeHeartbeatRequest request) throws YarnException,
                IOException {
View Full Code Here

Examples of org.apache.hadoop.yarn.server.api.ResourceTracker

              getResourceManager().getResourceTrackerService();
          final RecordFactory recordFactory =
            RecordFactoryProvider.getRecordFactory(null);

          // For in-process communication without RPC
          return new ResourceTracker() {

            @Override
            public NodeHeartbeatResponse nodeHeartbeat(
                NodeHeartbeatRequest request) throws YarnException,
                IOException {
View Full Code Here

Examples of org.apache.hadoop.yarn.server.api.ResourceTracker

  @BeforeClass
  public static void start() {
    InetSocketAddress address = new InetSocketAddress(0);
    Configuration configuration = new Configuration();
    ResourceTracker instance = new ResourceTrackerTestImpl();
    server = RpcServerFactoryPBImpl.get().getServer(ResourceTracker.class,
        instance, address, configuration, null, 1);
    server.start();

    client = (ResourceTracker) RpcClientFactoryPBImpl.get().getClient(
View Full Code Here

Examples of org.apache.hadoop.yarn.server.api.ResourceTracker

              .getResourceTrackerService();
          final RecordFactory recordFactory =
            RecordFactoryProvider.getRecordFactory(null);

          // For in-process communication without RPC
          return new ResourceTracker() {

            @Override
            public NodeHeartbeatResponse nodeHeartbeat(
                NodeHeartbeatRequest request) throws YarnRemoteException {
              NodeHeartbeatResponse response = recordFactory.newRecordInstance(
View Full Code Here

Examples of org.apache.hadoop.yarn.server.api.ResourceTracker

              .getResourceTrackerService();
          final RecordFactory recordFactory =
            RecordFactoryProvider.getRecordFactory(null);

          // For in-process communication without RPC
          return new ResourceTracker() {

            @Override
            public NodeHeartbeatResponse nodeHeartbeat(
                NodeHeartbeatRequest request) throws YarnException,
                IOException {
View Full Code Here

Examples of org.apache.hadoop.yarn.server.api.ResourceTracker

              .getResourceTrackerService();
          final RecordFactory recordFactory =
            RecordFactoryProvider.getRecordFactory(null);

          // For in-process communication without RPC
          return new ResourceTracker() {

            @Override
            public NodeHeartbeatResponse nodeHeartbeat(
                NodeHeartbeatRequest request) throws YarnRemoteException {
              NodeHeartbeatResponse response = recordFactory.newRecordInstance(
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.