> On 2012-05-26 03:16:44, Inder Singh wrote: > > Mike, > > > > if we are running multiple FLUME agents writing to the same directory then > > the probability of conflict still remains. > > Currently we address this by having different directories for each agent, > > in which case even the time thing seems to work fine.
Inder, agreed. The problem here is not between machines but on a single machine... nanoTime() should only be used for relative time, such as timing method calls. I haven't been able to locate the native x86 code in OpenJDK for nanoTime, but see the javadocs for more info: http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#nanoTime%28%29 - Mike ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/5228/#review8132 ----------------------------------------------------------- On 2012-05-25 21:40:21, Mike Percy wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/5228/ > ----------------------------------------------------------- > > (Updated 2012-05-25 21:40:21) > > > Review request for Flume. > > > Summary > ------- > > BucketWriter should not be using System.nanoTime() as a start time for file > suffix incrementation, because it's not guaranteed to be monotonically > increasing across system and process restarts. > > Also made the variable non-static. > > > This addresses bug FLUME-1229. > https://issues.apache.org/jira/browse/FLUME-1229 > > > Diffs > ----- > > > flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/BucketWriter.java > bbb398f > > Diff: https://reviews.apache.org/r/5228/diff > > > Testing > ------- > > > Thanks, > > Mike > >
