Github user chtyim commented on a diff in the pull request:

    https://github.com/apache/twill/pull/13#discussion_r82059853
  
    --- Diff: 
twill-core/src/main/java/org/apache/twill/internal/TwillRuntimeSpecification.java
 ---
    @@ -0,0 +1,94 @@
    +/*
    + * 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.twill.internal;
    +
    +import org.apache.twill.api.RunId;
    +import org.apache.twill.api.TwillApplication;
    +import org.apache.twill.api.TwillSpecification;
    +import org.apache.twill.api.logging.LogEntry;
    +
    +import java.net.URI;
    +import javax.annotation.Nullable;
    +
    +/**
    + * Represents runtime specification of a {@link TwillApplication}.
    + */
    +public class TwillRuntimeSpecification {
    +
    +  private final TwillSpecification twillSpecification;
    +
    +  private final String fsUser;
    +  private final URI twillAppDir;
    +  private final String zkConnectStr;
    +  private final RunId twillRunId;
    +  private final String twillAppName;
    +  private final int reservedMemory;
    +  private final String rmSchedulerAddr;
    +  private final LogEntry.Level logLevel;
    +
    +  public TwillRuntimeSpecification(TwillSpecification twillSpecification, 
@Nullable String fsUser, URI twillAppDir,
    +                                   String zkConnectStr, RunId twillRunId, 
String twillAppName,
    +                                   int reservedMemory, @Nullable String 
rmSchedulerAddr,
    +                                   @Nullable LogEntry.Level logLevel) {
    +    this.twillSpecification = twillSpecification;
    +    this.fsUser = fsUser;
    +    this.twillAppDir = twillAppDir;
    +    this.zkConnectStr = zkConnectStr;
    +    this.twillRunId = twillRunId;
    +    this.twillAppName = twillAppName;
    +    this.reservedMemory = reservedMemory;
    +    this.rmSchedulerAddr = rmSchedulerAddr;
    +    this.logLevel = logLevel;
    +  }
    +
    +  public TwillSpecification getTwillSpecification() {
    +    return twillSpecification;
    +  }
    +
    +  public String getFsUser() {
    +    return fsUser;
    +  }
    +
    +  public URI getTwillAppDir() {
    +    return twillAppDir;
    +  }
    +
    +  public String getZkConnectStr() {
    +    return zkConnectStr;
    +  }
    +
    +  public RunId getTwillRunId() {
    +    return twillRunId;
    +  }
    +
    +  public String getTwillAppName() {
    +    return twillAppName;
    +  }
    +
    +  public int getReservedMemory() {
    +    return reservedMemory;
    +  }
    +
    +  public String getRmSchedulerAddr() {
    --- End diff --
    
    For those that can be null, annotate the method with `@Nullable` as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to