]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
java: pretty print Ceph extent
authorNoah Watkins <noahwatkins@gmail.com>
Sun, 24 Mar 2013 20:03:56 +0000 (13:03 -0700)
committerNoah Watkins <noahwatkins@gmail.com>
Sun, 24 Mar 2013 20:03:56 +0000 (13:03 -0700)
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
src/java/java/com/ceph/fs/CephFileExtent.java

index e15ce51796a5d7e8b9c3695e454c77730fe3cce3..909ff1389705d773e4419a31375188b89912c26e 100644 (file)
@@ -19,6 +19,8 @@
  */
 package com.ceph.fs;
 
+import java.util.Arrays;
+
 /**
  * Holds information about a file extent in CephFS.
  */
@@ -53,4 +55,12 @@ public class CephFileExtent {
   public int[] getOSDs() {
     return osds;
   }
+
+  /**
+   * Pretty print.
+   */
+  public String toString() {
+    return "extent[" + offset + "," + length + ","
+      + Arrays.toString(osds) + "]";
+  }
 }