You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by ju...@apache.org on 2015/06/18 01:35:20 UTC

incubator-reef git commit: [REEF-381] Delete AbstractDriverRuntimeConfiguration

Repository: incubator-reef
Updated Branches:
  refs/heads/master 8f4f0ec8b -> 9964d5db3


[REEF-381] Delete AbstractDriverRuntimeConfiguration

JIRA:
  [REEF-381](https://issues.apache.org/jira/browse/REEF-381)

Pull Request:
  This closes #227

Author:    Markus Weimer <we...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/9964d5db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/9964d5db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/9964d5db

Branch: refs/heads/master
Commit: 9964d5db32dcfa788632fc8bb6856c1a3744809f
Parents: 8f4f0ec
Author: Markus Weimer <we...@apache.org>
Authored: Tue Jun 16 11:16:32 2015 -0700
Committer: Julia Wang <jw...@yahoo.com>
Committed: Wed Jun 17 16:33:03 2015 -0700

----------------------------------------------------------------------
 .../api/AbstractDriverRuntimeConfiguration.java | 102 -------------------
 1 file changed, 102 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/9964d5db/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/AbstractDriverRuntimeConfiguration.java
----------------------------------------------------------------------
diff --git a/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/AbstractDriverRuntimeConfiguration.java b/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/AbstractDriverRuntimeConfiguration.java
deleted file mode 100644
index 6daf71a..0000000
--- a/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/AbstractDriverRuntimeConfiguration.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.reef.runtime.common.driver.api;
-
-import org.apache.reef.runtime.common.driver.parameters.ClientRemoteIdentifier;
-import org.apache.reef.runtime.common.driver.parameters.DriverProcessMemory;
-import org.apache.reef.runtime.common.driver.parameters.EvaluatorTimeout;
-import org.apache.reef.runtime.common.driver.parameters.JobIdentifier;
-import org.apache.reef.tang.Configuration;
-import org.apache.reef.tang.JavaConfigurationBuilder;
-import org.apache.reef.tang.Tang;
-import org.apache.reef.tang.exceptions.BindException;
-import org.apache.reef.util.Builder;
-
-/**
- * @deprecated Runtimes are advised to create their own ConfigurationModules instead of subclassing this class.
- */
-@Deprecated
-public abstract class AbstractDriverRuntimeConfiguration implements Builder<Configuration> {
-
-  protected JavaConfigurationBuilder builder = Tang.Factory.getTang().newConfigurationBuilder();
-
-  protected AbstractDriverRuntimeConfiguration(
-      final Class<? extends ResourceLaunchHandler> resourceLaunchHandlerClass,
-      final Class<? extends ResourceReleaseHandler> resourceReleaseHandlerClass,
-      final Class<? extends ResourceRequestHandler> resourceRequestHandlerClass) {
-    try {
-      this.builder.bind(ResourceLaunchHandler.class, resourceLaunchHandlerClass);
-      this.builder.bind(ResourceReleaseHandler.class, resourceReleaseHandlerClass);
-      this.builder.bind(ResourceRequestHandler.class, resourceRequestHandlerClass);
-
-    } catch (final BindException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  public final Configuration build() {
-    return this.builder.build();
-  }
-
-  public final AbstractDriverRuntimeConfiguration addClientConfiguration(final Configuration conf) {
-    try {
-      this.builder.addConfiguration(conf);
-      return this;
-    } catch (final BindException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  public final AbstractDriverRuntimeConfiguration setJobIdentifier(final String id) {
-    try {
-      this.builder.bindNamedParameter(JobIdentifier.class, id.toString());
-      return this;
-    } catch (final BindException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  public final AbstractDriverRuntimeConfiguration setClientRemoteIdentifier(final String rid) {
-    try {
-      this.builder.bindNamedParameter(ClientRemoteIdentifier.class, rid.toString());
-      return this;
-    } catch (final BindException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  public final AbstractDriverRuntimeConfiguration setDriverProcessMemory(final int memory) {
-    try {
-      this.builder.bindNamedParameter(DriverProcessMemory.class, Integer.toString(memory));
-      return this;
-    } catch (final BindException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  public final AbstractDriverRuntimeConfiguration setEvaluatorTimeout(final long value) {
-    try {
-      this.builder.bindNamedParameter(EvaluatorTimeout.class, Long.toString(value));
-      return this;
-    } catch (final BindException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-}