Removed masters Counters class and replaced it with normal Java Atomic i...

Counters is not a thread-safe class.  The edit log didn't get dependency counts since that was a different variable.

Deleted Counters and replaced all instances with AtomicLong or Integer.
Didn't look that way when I just looked, but on bus so harder to give it
the attention it needs
On Nov 4, 2014 6:59 PM, "Haoyuan Li" <notifications@github.com> wrote:

> In core/src/main/java/tachyon/master/MasterInfo.java:
>
> > @@ -1766,10 +1767,15 @@ private MasterWorkerInfo getWorkerInfo(long workerId) {
> >    }
> >
> >    public void init() throws IOException {
> > -    mCheckpointInfo.updateEditTransactionCounter(mJournal.loadEditLog(this));
> > +    long current;
> > +    long max;
> > +    do {
> > +      current = mEditTransactionId.get();
> > +      max = Math.max(current, mJournal.loadEditLog(this));
> > +    } while (!mEditTransactionId.compareAndSet(current, max));
>
> In that case, each time will have a new stream for mJournal editlog
> loading, right?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/504/files#r19852727>.
>