2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 package org
.apache
.hadoop
.hbase
.rest
;
20 import static org
.junit
.Assert
.assertEquals
;
22 import com
.fasterxml
.jackson
.databind
.ObjectMapper
;
23 import com
.fasterxml
.jackson
.jaxrs
.json
.JacksonJaxbJsonProvider
;
25 import java
.io
.ByteArrayInputStream
;
26 import java
.io
.IOException
;
27 import java
.io
.StringWriter
;
29 import java
.util
.HashMap
;
31 import javax
.ws
.rs
.core
.MediaType
;
32 import javax
.xml
.bind
.JAXBContext
;
33 import javax
.xml
.bind
.JAXBException
;
34 import javax
.xml
.bind
.Marshaller
;
35 import javax
.xml
.bind
.Unmarshaller
;
37 import org
.apache
.hadoop
.conf
.Configuration
;
38 import org
.apache
.hadoop
.hbase
.HBaseTestingUtil
;
39 import org
.apache
.hadoop
.hbase
.TableName
;
40 import org
.apache
.hadoop
.hbase
.client
.Admin
;
41 import org
.apache
.hadoop
.hbase
.client
.ColumnFamilyDescriptor
;
42 import org
.apache
.hadoop
.hbase
.client
.ColumnFamilyDescriptorBuilder
;
43 import org
.apache
.hadoop
.hbase
.client
.TableDescriptorBuilder
;
44 import org
.apache
.hadoop
.hbase
.rest
.client
.Client
;
45 import org
.apache
.hadoop
.hbase
.rest
.client
.Cluster
;
46 import org
.apache
.hadoop
.hbase
.rest
.client
.Response
;
47 import org
.apache
.hadoop
.hbase
.rest
.model
.CellModel
;
48 import org
.apache
.hadoop
.hbase
.rest
.model
.CellSetModel
;
49 import org
.apache
.hadoop
.hbase
.rest
.model
.RowModel
;
50 import org
.apache
.hadoop
.hbase
.util
.Bytes
;
51 import org
.junit
.After
;
52 import org
.junit
.AfterClass
;
53 import org
.junit
.Before
;
54 import org
.junit
.BeforeClass
;
56 public class RowResourceBase
{
57 protected static final String TABLE
= "TestRowResource";
59 protected static final TableName TABLE_NAME
= TableName
.valueOf(TABLE
);
61 protected static final String CFA
= "a";
62 protected static final String CFB
= "b";
63 protected static final String COLUMN_1
= CFA
+ ":1";
64 protected static final String COLUMN_2
= CFB
+ ":2";
65 protected static final String COLUMN_3
= CFA
+ ":";
66 protected static final String ROW_1
= "testrow1";
67 protected static final String VALUE_1
= "testvalue1";
68 protected static final String ROW_2
= "testrow2";
69 protected static final String VALUE_2
= "testvalue2";
70 protected static final String ROW_3
= "testrow3";
71 protected static final String VALUE_3
= "testvalue3";
72 protected static final String ROW_4
= "testrow4";
73 protected static final String VALUE_4
= "testvalue4";
74 protected static final String VALUE_5
= "5";
75 protected static final String VALUE_6
= "6";
77 protected static final HBaseTestingUtil TEST_UTIL
= new HBaseTestingUtil();
78 protected static final HBaseRESTTestingUtility REST_TEST_UTIL
=
79 new HBaseRESTTestingUtility();
80 protected static Client client
;
81 protected static JAXBContext context
;
82 protected static Marshaller xmlMarshaller
;
83 protected static Unmarshaller xmlUnmarshaller
;
84 protected static Configuration conf
;
85 protected static ObjectMapper jsonMapper
;
88 public static void setUpBeforeClass() throws Exception
{
89 conf
= TEST_UTIL
.getConfiguration();
90 TEST_UTIL
.startMiniCluster(3);
91 REST_TEST_UTIL
.startServletContainer(conf
);
92 context
= JAXBContext
.newInstance(
96 xmlMarshaller
= context
.createMarshaller();
97 xmlUnmarshaller
= context
.createUnmarshaller();
98 jsonMapper
= new JacksonJaxbJsonProvider()
99 .locateMapper(CellSetModel
.class, MediaType
.APPLICATION_JSON_TYPE
);
100 client
= new Client(new Cluster().add("localhost",
101 REST_TEST_UTIL
.getServletPort()));
105 public static void tearDownAfterClass() throws Exception
{
106 REST_TEST_UTIL
.shutdownServletContainer();
107 TEST_UTIL
.shutdownMiniCluster();
111 public void beforeMethod() throws Exception
{
112 Admin admin
= TEST_UTIL
.getAdmin();
113 if (admin
.tableExists(TABLE_NAME
)) {
114 TEST_UTIL
.deleteTable(TABLE_NAME
);
116 TableDescriptorBuilder tableDescriptorBuilder
=
117 TableDescriptorBuilder
.newBuilder(TableName
.valueOf(TABLE
));
118 ColumnFamilyDescriptor columnFamilyDescriptor
= ColumnFamilyDescriptorBuilder
119 .newBuilder(Bytes
.toBytes(CFA
)).build();
120 tableDescriptorBuilder
.setColumnFamily(columnFamilyDescriptor
);
121 columnFamilyDescriptor
= ColumnFamilyDescriptorBuilder
122 .newBuilder(Bytes
.toBytes(CFB
)).build();
123 tableDescriptorBuilder
.setColumnFamily(columnFamilyDescriptor
);
124 admin
.createTable(tableDescriptorBuilder
.build());
128 public void afterMethod() throws Exception
{
129 Admin admin
= TEST_UTIL
.getAdmin();
130 if (admin
.tableExists(TABLE_NAME
)) {
131 TEST_UTIL
.deleteTable(TABLE_NAME
);
135 static Response
putValuePB(String table
, String row
, String column
,
136 String value
) throws IOException
{
137 StringBuilder path
= new StringBuilder();
144 return putValuePB(path
.toString(), table
, row
, column
, value
);
147 static Response
putValuePB(String url
, String table
, String row
,
148 String column
, String value
) throws IOException
{
149 RowModel rowModel
= new RowModel(row
);
150 rowModel
.addCell(new CellModel(Bytes
.toBytes(column
),
151 Bytes
.toBytes(value
)));
152 CellSetModel cellSetModel
= new CellSetModel();
153 cellSetModel
.addRow(rowModel
);
154 Response response
= client
.put(url
, Constants
.MIMETYPE_PROTOBUF
,
155 cellSetModel
.createProtobufOutput());
160 protected static void checkValueXML(String url
, String table
, String row
,
161 String column
, String value
) throws IOException
, JAXBException
{
162 Response response
= getValueXML(url
);
163 assertEquals(200, response
.getCode());
164 assertEquals(Constants
.MIMETYPE_XML
, response
.getHeader("content-type"));
165 CellSetModel cellSet
= (CellSetModel
)
166 xmlUnmarshaller
.unmarshal(new ByteArrayInputStream(response
.getBody()));
167 RowModel rowModel
= cellSet
.getRows().get(0);
168 CellModel cell
= rowModel
.getCells().get(0);
169 assertEquals(Bytes
.toString(cell
.getColumn()), column
);
170 assertEquals(Bytes
.toString(cell
.getValue()), value
);
173 protected static void checkValueXML(String table
, String row
, String column
,
174 String value
) throws IOException
, JAXBException
{
175 Response response
= getValueXML(table
, row
, column
);
176 assertEquals(200, response
.getCode());
177 assertEquals(Constants
.MIMETYPE_XML
, response
.getHeader("content-type"));
178 CellSetModel cellSet
= (CellSetModel
)
179 xmlUnmarshaller
.unmarshal(new ByteArrayInputStream(response
.getBody()));
180 RowModel rowModel
= cellSet
.getRows().get(0);
181 CellModel cell
= rowModel
.getCells().get(0);
182 assertEquals(Bytes
.toString(cell
.getColumn()), column
);
183 assertEquals(Bytes
.toString(cell
.getValue()), value
);
186 protected static void checkIncrementValueXML(String table
, String row
, String column
, long value
)
187 throws IOException
, JAXBException
{
188 Response response1
= getValueXML(table
, row
, column
);
189 assertEquals(200, response1
.getCode());
190 assertEquals(Constants
.MIMETYPE_XML
, response1
.getHeader("content-type"));
191 CellSetModel cellSet
= (CellSetModel
)
192 xmlUnmarshaller
.unmarshal(new ByteArrayInputStream(response1
.getBody()));
193 RowModel rowModel
= cellSet
.getRows().get(0);
194 CellModel cell
= rowModel
.getCells().get(0);
195 assertEquals(Bytes
.toString(cell
.getColumn()), column
);
196 assertEquals(Bytes
.toLong(cell
.getValue()), value
);
199 protected static Response
getValuePB(String url
) throws IOException
{
200 Response response
= client
.get(url
, Constants
.MIMETYPE_PROTOBUF
);
204 protected static Response
putValueXML(String table
, String row
, String column
,
205 String value
) throws IOException
, JAXBException
{
206 StringBuilder path
= new StringBuilder();
213 return putValueXML(path
.toString(), table
, row
, column
, value
);
216 protected static Response
putValueXML(String url
, String table
, String row
,
217 String column
, String value
) throws IOException
, JAXBException
{
218 RowModel rowModel
= new RowModel(row
);
219 rowModel
.addCell(new CellModel(Bytes
.toBytes(column
),
220 Bytes
.toBytes(value
)));
221 CellSetModel cellSetModel
= new CellSetModel();
222 cellSetModel
.addRow(rowModel
);
223 StringWriter writer
= new StringWriter();
224 xmlMarshaller
.marshal(cellSetModel
, writer
);
225 Response response
= client
.put(url
, Constants
.MIMETYPE_XML
,
226 Bytes
.toBytes(writer
.toString()));
231 protected static Response
getValuePB(String table
, String row
, String column
)
233 StringBuilder path
= new StringBuilder();
240 return getValuePB(path
.toString());
243 protected static void checkValuePB(String table
, String row
, String column
,
244 String value
) throws IOException
{
245 Response response
= getValuePB(table
, row
, column
);
246 assertEquals(200, response
.getCode());
247 assertEquals(Constants
.MIMETYPE_PROTOBUF
, response
.getHeader("content-type"));
248 CellSetModel cellSet
= new CellSetModel();
249 cellSet
.getObjectFromMessage(response
.getBody());
250 RowModel rowModel
= cellSet
.getRows().get(0);
251 CellModel cell
= rowModel
.getCells().get(0);
252 assertEquals(Bytes
.toString(cell
.getColumn()), column
);
253 assertEquals(Bytes
.toString(cell
.getValue()), value
);
256 protected static void checkIncrementValuePB(String table
, String row
, String column
,
257 long value
) throws IOException
{
258 Response response
= getValuePB(table
, row
, column
);
259 assertEquals(200, response
.getCode());
260 assertEquals(Constants
.MIMETYPE_PROTOBUF
, response
.getHeader("content-type"));
261 CellSetModel cellSet
= new CellSetModel();
262 cellSet
.getObjectFromMessage(response
.getBody());
263 RowModel rowModel
= cellSet
.getRows().get(0);
264 CellModel cell
= rowModel
.getCells().get(0);
265 assertEquals(Bytes
.toString(cell
.getColumn()), column
);
266 assertEquals(Bytes
.toLong(cell
.getValue()), value
);
269 protected static Response
checkAndPutValuePB(String url
, String table
, String row
, String column
,
270 String valueToCheck
, String valueToPut
, HashMap
<String
,String
> otherCells
)
272 RowModel rowModel
= new RowModel(row
);
273 rowModel
.addCell(new CellModel(Bytes
.toBytes(column
),
274 Bytes
.toBytes(valueToPut
)));
276 if (otherCells
!= null) {
277 for (Map
.Entry
<String
,String
> entry
: otherCells
.entrySet()) {
278 rowModel
.addCell(new CellModel(Bytes
.toBytes(entry
.getKey()),
279 Bytes
.toBytes(entry
.getValue())));
283 // This Cell need to be added as last cell.
284 rowModel
.addCell(new CellModel(Bytes
.toBytes(column
),
285 Bytes
.toBytes(valueToCheck
)));
287 CellSetModel cellSetModel
= new CellSetModel();
288 cellSetModel
.addRow(rowModel
);
289 Response response
= client
.put(url
, Constants
.MIMETYPE_PROTOBUF
,
290 cellSetModel
.createProtobufOutput());
295 protected static Response
checkAndPutValuePB(String table
, String row
,
296 String column
, String valueToCheck
, String valueToPut
) throws IOException
{
297 return checkAndPutValuePB(table
,row
,column
,valueToCheck
,valueToPut
,null);
300 protected static Response
checkAndPutValuePB(String table
, String row
, String column
,
301 String valueToCheck
, String valueToPut
, HashMap
<String
,String
> otherCells
)
303 StringBuilder path
= new StringBuilder();
308 path
.append("?check=put");
309 return checkAndPutValuePB(path
.toString(), table
, row
, column
,
310 valueToCheck
, valueToPut
, otherCells
);
313 protected static Response
checkAndPutValueXML(String url
, String table
, String row
, String column
,
314 String valueToCheck
, String valueToPut
, HashMap
<String
,String
> otherCells
)
315 throws IOException
, JAXBException
{
316 RowModel rowModel
= new RowModel(row
);
317 rowModel
.addCell(new CellModel(Bytes
.toBytes(column
),
318 Bytes
.toBytes(valueToPut
)));
320 if (otherCells
!= null) {
321 for (Map
.Entry
<String
,String
> entry
: otherCells
.entrySet()) {
322 rowModel
.addCell(new CellModel(Bytes
.toBytes(entry
.getKey()),
323 Bytes
.toBytes(entry
.getValue())));
327 // This Cell need to be added as last cell.
328 rowModel
.addCell(new CellModel(Bytes
.toBytes(column
),
329 Bytes
.toBytes(valueToCheck
)));
330 CellSetModel cellSetModel
= new CellSetModel();
331 cellSetModel
.addRow(rowModel
);
332 StringWriter writer
= new StringWriter();
333 xmlMarshaller
.marshal(cellSetModel
, writer
);
334 Response response
= client
.put(url
, Constants
.MIMETYPE_XML
,
335 Bytes
.toBytes(writer
.toString()));
340 protected static Response
checkAndPutValueXML(String table
, String row
, String column
,
341 String valueToCheck
, String valueToPut
) throws IOException
, JAXBException
{
342 return checkAndPutValueXML(table
,row
,column
,valueToCheck
,valueToPut
, null);
345 protected static Response
checkAndPutValueXML(String table
, String row
,
346 String column
, String valueToCheck
, String valueToPut
, HashMap
<String
,String
> otherCells
)
347 throws IOException
, JAXBException
{
348 StringBuilder path
= new StringBuilder();
353 path
.append("?check=put");
354 return checkAndPutValueXML(path
.toString(), table
, row
, column
,
355 valueToCheck
, valueToPut
, otherCells
);
358 protected static Response
checkAndDeleteXML(String url
, String table
,
359 String row
, String column
, String valueToCheck
, HashMap
<String
,String
> cellsToDelete
)
360 throws IOException
, JAXBException
{
361 RowModel rowModel
= new RowModel(row
);
363 if (cellsToDelete
!= null) {
364 for (Map
.Entry
<String
,String
> entry
: cellsToDelete
.entrySet()) {
365 rowModel
.addCell(new CellModel(Bytes
.toBytes(entry
.getKey()),
366 Bytes
.toBytes(entry
.getValue())));
369 // Add this at the end
370 rowModel
.addCell(new CellModel(Bytes
.toBytes(column
),
371 Bytes
.toBytes(valueToCheck
)));
372 CellSetModel cellSetModel
= new CellSetModel();
373 cellSetModel
.addRow(rowModel
);
374 StringWriter writer
= new StringWriter();
375 xmlMarshaller
.marshal(cellSetModel
, writer
);
376 Response response
= client
.put(url
, Constants
.MIMETYPE_XML
,
377 Bytes
.toBytes(writer
.toString()));
382 protected static Response
checkAndDeleteXML(String table
, String row
,
383 String column
, String valueToCheck
) throws IOException
, JAXBException
{
384 return checkAndDeleteXML(table
, row
, column
, valueToCheck
, null);
387 protected static Response
checkAndDeleteXML(String table
, String row
,
388 String column
, String valueToCheck
, HashMap
<String
,String
> cellsToDelete
)
389 throws IOException
, JAXBException
{
390 StringBuilder path
= new StringBuilder();
395 path
.append("?check=delete");
396 return checkAndDeleteXML(path
.toString(), table
, row
, column
, valueToCheck
, cellsToDelete
);
399 protected static Response
checkAndDeleteJson(String table
, String row
,
400 String column
, String valueToCheck
) throws IOException
{
401 return checkAndDeleteJson(table
, row
, column
, valueToCheck
, null);
404 protected static Response
checkAndDeleteJson(String table
, String row
,
405 String column
, String valueToCheck
, HashMap
<String
,String
> cellsToDelete
)
407 StringBuilder path
= new StringBuilder();
412 path
.append("?check=delete");
413 return checkAndDeleteJson(path
.toString(), table
, row
, column
, valueToCheck
, cellsToDelete
);
416 protected static Response
checkAndDeleteJson(String url
, String table
,
417 String row
, String column
, String valueToCheck
, HashMap
<String
,String
> cellsToDelete
)
419 RowModel rowModel
= new RowModel(row
);
421 if (cellsToDelete
!= null) {
422 for (Map
.Entry
<String
,String
> entry
: cellsToDelete
.entrySet()) {
423 rowModel
.addCell(new CellModel(Bytes
.toBytes(entry
.getKey()),
424 Bytes
.toBytes(entry
.getValue())));
427 // Add this at the end
428 rowModel
.addCell(new CellModel(Bytes
.toBytes(column
),
429 Bytes
.toBytes(valueToCheck
)));
430 CellSetModel cellSetModel
= new CellSetModel();
431 cellSetModel
.addRow(rowModel
);
432 String jsonString
= jsonMapper
.writeValueAsString(cellSetModel
);
433 Response response
= client
.put(url
, Constants
.MIMETYPE_JSON
,
434 Bytes
.toBytes(jsonString
));
439 protected static Response
checkAndDeletePB(String table
, String row
, String column
, String value
)
441 return checkAndDeletePB(table
, row
, column
, value
, null);
444 protected static Response
checkAndDeletePB(String table
, String row
,
445 String column
, String value
, HashMap
<String
,String
> cellsToDelete
) throws IOException
{
446 StringBuilder path
= new StringBuilder();
451 path
.append("?check=delete");
452 return checkAndDeleteValuePB(path
.toString(), table
, row
, column
, value
, cellsToDelete
);
454 protected static Response
checkAndDeleteValuePB(String url
, String table
,
455 String row
, String column
, String valueToCheck
, HashMap
<String
,String
> cellsToDelete
)
457 RowModel rowModel
= new RowModel(row
);
459 if (cellsToDelete
!= null) {
460 for (Map
.Entry
<String
,String
> entry
: cellsToDelete
.entrySet()) {
461 rowModel
.addCell(new CellModel(Bytes
.toBytes(entry
.getKey()),
462 Bytes
.toBytes(entry
.getValue())));
465 // Add this at the end
466 rowModel
.addCell(new CellModel(Bytes
.toBytes(column
), Bytes
467 .toBytes(valueToCheck
)));
468 CellSetModel cellSetModel
= new CellSetModel();
469 cellSetModel
.addRow(rowModel
);
470 Response response
= client
.put(url
, Constants
.MIMETYPE_PROTOBUF
,
471 cellSetModel
.createProtobufOutput());
476 protected static Response
getValueXML(String table
, String startRow
,
477 String endRow
, String column
) throws IOException
{
478 StringBuilder path
= new StringBuilder();
482 path
.append(startRow
);
487 return getValueXML(path
.toString());
490 protected static Response
getValueXML(String url
) throws IOException
{
491 Response response
= client
.get(url
, Constants
.MIMETYPE_XML
);
495 protected static Response
getValueJson(String url
) throws IOException
{
496 Response response
= client
.get(url
, Constants
.MIMETYPE_JSON
);
500 protected static Response
deleteValue(String table
, String row
, String column
)
502 StringBuilder path
= new StringBuilder();
509 Response response
= client
.delete(path
.toString());
514 protected static Response
getValueXML(String table
, String row
, String column
)
516 StringBuilder path
= new StringBuilder();
523 return getValueXML(path
.toString());
526 protected static Response
deleteRow(String table
, String row
)
528 StringBuilder path
= new StringBuilder();
533 Response response
= client
.delete(path
.toString());
538 protected static Response
getValueJson(String table
, String row
,
539 String column
) throws IOException
{
540 StringBuilder path
= new StringBuilder();
547 return getValueJson(path
.toString());
550 protected static void checkValueJSON(String table
, String row
, String column
,
551 String value
) throws IOException
{
552 Response response
= getValueJson(table
, row
, column
);
553 assertEquals(200, response
.getCode());
554 assertEquals(Constants
.MIMETYPE_JSON
, response
.getHeader("content-type"));
555 ObjectMapper mapper
= new JacksonJaxbJsonProvider().locateMapper(CellSetModel
.class,
556 MediaType
.APPLICATION_JSON_TYPE
);
557 CellSetModel cellSet
= mapper
.readValue(response
.getBody(), CellSetModel
.class);
558 RowModel rowModel
= cellSet
.getRows().get(0);
559 CellModel cell
= rowModel
.getCells().get(0);
560 assertEquals(Bytes
.toString(cell
.getColumn()), column
);
561 assertEquals(Bytes
.toString(cell
.getValue()), value
);
564 protected static void checkIncrementValueJSON(String table
, String row
, String column
,
565 long value
) throws IOException
{
566 Response response
= getValueJson(table
, row
, column
);
567 assertEquals(200, response
.getCode());
568 assertEquals(Constants
.MIMETYPE_JSON
, response
.getHeader("content-type"));
569 ObjectMapper mapper
= new JacksonJaxbJsonProvider()
570 .locateMapper(CellSetModel
.class, MediaType
.APPLICATION_JSON_TYPE
);
571 CellSetModel cellSet
= mapper
.readValue(response
.getBody(), CellSetModel
.class);
572 RowModel rowModel
= cellSet
.getRows().get(0);
573 CellModel cell
= rowModel
.getCells().get(0);
574 assertEquals(Bytes
.toString(cell
.getColumn()), column
);
575 assertEquals(Bytes
.toLong(cell
.getValue()), value
);
578 protected static Response
putValueJson(String table
, String row
, String column
,
579 String value
) throws IOException
{
580 StringBuilder path
= new StringBuilder();
587 return putValueJson(path
.toString(), table
, row
, column
, value
);
590 protected static Response
putValueJson(String url
, String table
, String row
, String column
,
591 String value
) throws IOException
{
592 RowModel rowModel
= new RowModel(row
);
593 rowModel
.addCell(new CellModel(Bytes
.toBytes(column
),
594 Bytes
.toBytes(value
)));
595 CellSetModel cellSetModel
= new CellSetModel();
596 cellSetModel
.addRow(rowModel
);
597 String jsonString
= jsonMapper
.writeValueAsString(cellSetModel
);
598 Response response
= client
.put(url
, Constants
.MIMETYPE_JSON
,
599 Bytes
.toBytes(jsonString
));
604 protected static Response
appendValueXML(String table
, String row
, String column
,
605 String value
) throws IOException
, JAXBException
{
606 StringBuilder path
= new StringBuilder();
611 path
.append("?check=append");
612 return putValueXML(path
.toString(), table
, row
, column
, value
);
615 protected static Response
appendValuePB(String table
, String row
, String column
,
616 String value
) throws IOException
{
617 StringBuilder path
= new StringBuilder();
622 path
.append("?check=append");
623 return putValuePB(path
.toString(), table
, row
, column
, value
);
626 protected static Response
appendValueJson(String table
, String row
, String column
,
627 String value
) throws IOException
, JAXBException
{
628 StringBuilder path
= new StringBuilder();
633 path
.append("?check=append");
634 return putValueJson(path
.toString(), table
, row
, column
, value
);
637 protected static Response
incrementValueXML(String table
, String row
, String column
,
638 String value
) throws IOException
, JAXBException
{
639 StringBuilder path
= new StringBuilder();
644 path
.append("?check=increment");
645 return putValueXML(path
.toString(), table
, row
, column
, value
);
648 protected static Response
incrementValuePB(String table
, String row
, String column
,
649 String value
) throws IOException
{
650 StringBuilder path
= new StringBuilder();
655 path
.append("?check=increment");
656 return putValuePB(path
.toString(), table
, row
, column
, value
);
659 protected static Response
incrementValueJson(String table
, String row
, String column
,
660 String value
) throws IOException
, JAXBException
{
661 StringBuilder path
= new StringBuilder();
666 path
.append("?check=increment");
667 return putValueJson(path
.toString(), table
, row
, column
, value
);