Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/5236#discussion_r27517850
--- Diff:
network/common/src/main/java/org/apache/spark/network/util/JavaUtils.java ---
@@ -121,4 +121,59 @@ private static boolean isSymlink(File file) throws
IOException {
}
return
!fileInCanonicalDir.getCanonicalFile().equals(fileInCanonicalDir.getAbsoluteFile());
}
+
+ /**
+ * Convert a passed time string (e.g. 50s, 100ms, or 250us) to a
microsecond count for
+ * internal use. If no suffix is provided a direct conversion is
attempted.
+ */
+ private static long timeStringToUs(String str) throws
NumberFormatException {
--- End diff --
This method can be very similar to the Scala one (using an
`com.google.common.collect.ImmutableMap` to hold the valid suffixes). Maybe
that's what you meant by updating the Java code later.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]