reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mariia Mykhailova (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (REEF-1141) Triage XXX|FIX notes in Java code
Date Mon, 20 Jun 2016 19:26:58 GMT

    [ https://issues.apache.org/jira/browse/REEF-1141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15340241#comment-15340241
] 

Mariia Mykhailova commented on REEF-1141:
-----------------------------------------

I've filed REEF-1460 and REEF-1461 for two of the notes.

[~markus.weimer] Could you please help triage the rest of them?

> Triage XXX|FIX notes in Java code
> ---------------------------------
>
>                 Key: REEF-1141
>                 URL: https://issues.apache.org/jira/browse/REEF-1141
>             Project: REEF
>          Issue Type: Sub-task
>          Components: All
>            Reporter: Mariia Mykhailova
>            Priority: Minor
>
> They are fewer than TODOs, so I'm not creating per-project issues.
> Note that there are some FIXME messages not detected by Checkstyle (they are part of
string constants, not comments).
> {noformat}
> org/apache/reef/common/AbstractFailure.java
>   * FIXME: Replace RuntimeException with a better class.
>   public Throwable asError() {
>     return this.cause.isPresent() ? this.cause.get() : new RuntimeException(this.toString());
>   }
> {noformat}
> {noformat}
> org/apache/reef/runtime/common/driver/evaluator/Evaluators.java
> org/apache/reef/runtime/common/driver/resourcemanager/ResourceAllocationHandler.java
>   * FIXME: This method is a temporary fix for the race condition
>   * described in issues #828 and #839.
>   public synchronized void put(
>       final EvaluatorManagerFactory evaluatorManagerFactory,
>       final ResourceAllocationEvent evaluatorMsg) {
>     this.put(evaluatorManagerFactory.getNewEvaluatorManagerForNewEvaluator(evaluatorMsg));
>   }
> {noformat}
> Issue [#828|https://github.com/Microsoft-CISL/REEF/issues/828] is resolved, [#839|https://github.com/Microsoft-CISL/REEF/issues/839]
stays open in CISL version of REEF.
> {noformat}
> org/apache/reef/tang/util/Tint.java
>   private void processDefaultAnnotation(final Class<?> cmb) {
>     final DefaultImplementation di = cmb.getAnnotation(DefaultImplementation.class);
>     // XXX hack: move to helper method + unify with rest of Tang!
>     if (di != null) {
>       final String diName = di.value() == Void.class ? di.name() : ReflectionUtilities.getFullName(di.value());
>       final ClassNode<?> cn = (ClassNode<?>) ch.getNode(cmb);
>       final String cnS = cn.getFullName();
>       if (!usages.contains(diName, cnS)) {
>         usages.put(diName, cnS);
>         if (!knownClasses.contains(cn)) {
>           knownClasses.add(cn);
>         }
>       }
>     }
>   }
> {noformat}
> {noformat}
> org/apache/reef/wake/profiler/WakeProfiler.java
>     boolean isEventHandler = false;
>     for (final Method m : clazz.getDeclaredMethods()) {
>       if (m.getName().equals("onNext")) { // XXX hack: Interpose on "event handler in
spirit"
>         isEventHandler = true;
>       }
>     }
> {noformat}
> {noformat}
> org/apache/reef/tang/implementation/java/InjectorImpl.java
>   <T> void bindVolatileParameterNoCopy(final Class<? extends Name<T>>
cl, final T o)
>       ...
>       if (old != null) {
>         // XXX need to get the binding site here!
>         throw new BindException(
>             "Attempt to re-bind named parameter " + ReflectionUtilities.getFullName(cl)
+ ".  Old value was [" + old
>                 + "] new value is [" + o + "]");
>       }
> {noformat}
> {noformat}
> org/apache/reef/tang/implementation/java/JavaNodeFactory.java
>       if (defaultImplementationClazz.equals(Void.class)) {
>         defaultImplementation = defaultImpl.name();
>         // XXX check isAssignableFrom, other type problems here.
>       }
>   /**
>    * XXX: This method assumes that all generic types have exactly one type parameter.
>    */
>   public static <T> NamedParameterNode<T> createNamedParameterNode(final
Node parent,
>                                                                    final Class<? extends
Name<T>> clazz,
>                                                                    final Type argClass)
>       throws ClassHierarchyException {
> {noformat}
> {noformat}
> org/apache/reef/tang/implementation/java/JavaNodeFactory.java
>           catch (final ParseException e) {
>             // Parsability is now pre-checked in bindSet, so it should not be reached!
>             throw new IllegalStateException("Could not parse " + o + " which was passed
into " + np +
>                 " FIXME: Parsability is not currently checked by bindSetEntry(Node,String)",
e);
>           }
> {noformat}
> {noformat}
> org/apache/reef/tang/implementation/protobuf/ProtocolBufferInjectionPlan.java
>   private Object parse(final String type, final String value) {
>     // XXX this is a placeholder for now.  We need a parser API that will
>     // either produce a live java object or (partially) validate stuff to
>     // see if it looks like the target language will be able to handle this
>     // type + value.
>     return value;
>   }
> {noformat}
> ProtocolBufferInjectionPlan class is not used - do we need to keep it?
> {noformat}
> org/apache/reef/tang/util/ReflectionUtilities.java
>       if (clazz instanceof WildcardType) {
>         workQueue.add(Object.class); // XXX not really correct, but close enough?
>       } else if (clazz instanceof TypeVariable) {
>         workQueue.add(Object.class); // XXX not really correct, but close enough?
>       }
> {noformat}
> {noformat}
> org/apache/reef/tang/util/walk/Walk.java
>    * FIXME: handle loopy graphs correctly!
>   public static <T extends Traversable<T>> boolean preorder(
>       final NodeVisitor<T> nodeVisitor, final EdgeVisitor<T> edgeVisitor,
final T node) {
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message