[ 
https://issues.apache.org/jira/browse/HBASE-21246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16645333#comment-16645333
 ] 

Josh Elser commented on HBASE-21246:
------------------------------------

{code:java}
+  static WALIdentity UNKNOWN = new WALIdentity() {
+    
+    @Override
+    public long getWalStartTime() {
+      return 0;
+    }
+
+    @Override
+    public String getName() {
+      return "UNKNOWN";
+    }
+
+    @Override
+    public int compareTo(WALIdentity o) {
+      if (o == UNKNOWN) {
+        return 0;
+      }
+      return -1;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+      if (!(o instanceof WALIdentity)) {
+        return false;
+      }
+      if (compareTo((WALIdentity)o) == 0) {
+        return true;
+      }
+      return false;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+  };{code}
Seems unused. Remove it?
{code:java}
+  /**
+   * Creates WALIdentity for WAL path/name
+   * @param wal
+   * @return WALIdentity instance for the WAL
+   */{code}
Same here as the {{getName()}} comment above. Make it clear that this name 
should be uniquely identifying a WAL in this WALProvider.

> Introduce WALIdentity interface
> -------------------------------
>
>                 Key: HBASE-21246
>                 URL: https://issues.apache.org/jira/browse/HBASE-21246
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>            Priority: Major
>         Attachments: 21246.HBASE-20952.001.patch, 21246.HBASE-20952.002.patch
>
>
> We are introducing WALIdentity interface so that the WAL representation can 
> be decoupled from distributed filesystem.
> The interface provides getName method whose return value can represent 
> filename in distributed filesystem environment or, the name of the stream 
> when the WAL is backed by log stream.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to