@Test public void equalsTest() throws Exception { new EqualsTester() .addEqualityGroup(new LocalFirstPolicy(TieredIdentityFactory.fromString("node=x,rack=y", sConf), sConf)) .addEqualityGroup(new LocalFirstPolicy(TieredIdentityFactory.fromString("node=x,rack=z", sConf), sConf)) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof LocalFirstPolicy)) { return false; } LocalFirstPolicy that = (LocalFirstPolicy) o; return Objects.equals(mTieredIdentity, that.mTieredIdentity); }
LocalFirstPolicy implements BlockLocationPolicy { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof LocalFirstPolicy)) { return false; } LocalFirstPolicy that = (LocalFirstPolicy) o; return Objects.equals(mTieredIdentity, that.mTieredIdentity); } }
LocalFirstPolicy implements BlockLocationPolicy { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof LocalFirstPolicy)) { return false; } LocalFirstPolicy that = (LocalFirstPolicy) o; return Objects.equals(mTieredIdentity, that.mTieredIdentity); } LocalFirstPolicy(AlluxioConfiguration conf); @VisibleForTesting  LocalFirstPolicy(TieredIdentity identity, AlluxioConfiguration conf); }
LocalFirstPolicy implements BlockLocationPolicy { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof LocalFirstPolicy)) { return false; } LocalFirstPolicy that = (LocalFirstPolicy) o; return Objects.equals(mTieredIdentity, that.mTieredIdentity); } LocalFirstPolicy(AlluxioConfiguration conf); @VisibleForTesting  LocalFirstPolicy(TieredIdentity identity, AlluxioConfiguration conf); @Override WorkerNetAddress getWorker(GetWorkerOptions options); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
LocalFirstPolicy implements BlockLocationPolicy { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof LocalFirstPolicy)) { return false; } LocalFirstPolicy that = (LocalFirstPolicy) o; return Objects.equals(mTieredIdentity, that.mTieredIdentity); } LocalFirstPolicy(AlluxioConfiguration conf); @VisibleForTesting  LocalFirstPolicy(TieredIdentity identity, AlluxioConfiguration conf); @Override WorkerNetAddress getWorker(GetWorkerOptions options); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }