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.
In tachyon master it checks of its the leader and is so calls init. If you
swap leader multiple times (can happen) then this gets called multiple
times back to back.
On Nov 4, 2014 6:51 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));
>
> For HA logic, where did it load the same stream multiple times?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/504/files#r19852543>.
>