Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20231

Not able to delete column family from a row using RemoteHTable

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.3, 1.4.4, 2.0.0, 1.2.7
    • Component/s: REST
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Example code to reproduce the issue,

          Cluster cluster = new Cluster();
          cluster.add("rest-server-IP", rest-server-port);
      
          Client client = new Client(cluster);
          RemoteHTable table = new RemoteHTable(client, "t1");
      
          // Insert few records,
          Put put = new Put(Bytes.toBytes("r1"));
          put.add(Bytes.toBytes("cf1"), Bytes.toBytes("c1"), Bytes.toBytes("c1"));
          put.add(Bytes.toBytes("cf1"), Bytes.toBytes("c2"), Bytes.toBytes("c2"));
          put.add(Bytes.toBytes("cf2"), Bytes.toBytes("c1"), Bytes.toBytes("c1"));
          table.put(put);
      
          put = new Put(Bytes.toBytes("r2"));
          put.add(Bytes.toBytes("cf1"), Bytes.toBytes("c1"), Bytes.toBytes("c1"));
          put.add(Bytes.toBytes("cf1"), Bytes.toBytes("c2"), Bytes.toBytes("c2"));
          put.add(Bytes.toBytes("cf2"), Bytes.toBytes("c1"), Bytes.toBytes("c1"));
          table.put(put);
      
          // Delete the entire column family from the row
          Delete del = new Delete(Bytes.toBytes("r2"));
          del.addFamily(Bytes.toBytes("cf1"));
          table.delete(del);
      

      Here the problem is in building row specification in RemoteHTable.buildRowSpec(). Row specification is framed as "/t1/r2/cf1:" instead of "/t1/r2/cf1". 

        Attachments

        1. HBASE-20231-branch-1.3.patch
          3 kB
          Pankaj Kumar
        2. HBASE-20231-branch-1-v3.patch
          3 kB
          Pankaj Kumar
        3. HBASE-20231-v3.patch
          3 kB
          Pankaj Kumar
        4. HBASE-20231-v2.patch
          3 kB
          Pankaj Kumar
        5. HBASE-20231-branch-1-v2.patch
          3 kB
          Pankaj Kumar
        6. HBASE-20231.patch
          3 kB
          Pankaj Kumar
        7. HBASE-20231-branch-1.patch
          3 kB
          Pankaj Kumar

          Activity

            People

            • Assignee:
              pankaj2461 Pankaj Kumar
              Reporter:
              pankaj2461 Pankaj Kumar
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: