Package com.netflix.astyanax

Examples of com.netflix.astyanax.MutationBatch.execute()


        for (N columnName : rowColumnValues.get(rowKey).keySet()) {
          clm.putColumn((N)getComposite(columnName), rowColumnValues.get(rowKey).get(columnName), getSerializer(valueSerializer), ttl);
          CMBControllerServlet.valueAccumulator.addToCounter(AccumulatorName.CassandraWrite, 1L);
        }
      }
      OperationResult<Void> result = m.execute();
    } catch (ConnectionException ex) {
      throw new PersistenceException(ex);
    } finally {
      long ts2 = System.currentTimeMillis();
      CMBControllerServlet.valueAccumulator.addToCounter(AccumulatorName.CassandraTime, (ts2 - ts1));
View Full Code Here


      if (column != null) {
        clm.deleteColumn((N)getComposite(column));
      } else {
        clm.delete();
      }
      OperationResult<Void> result = m.execute();
    } catch (NotFoundException ex){
      //ignore.
    } catch (ConnectionException ex) {
      throw new PersistenceException(ex);
    } finally {
View Full Code Here

          ColumnListMutation<N> clm = m.withRow((ColumnFamily<K, N>)getColumnFamily(columnFamily), keyList.get(i));
          clm.deleteColumn((N)getComposite(columnList.get(i)));
          CMBControllerServlet.valueAccumulator.addToCounter(AccumulatorName.CassandraWrite, 1L);
        }
      }
      OperationResult<Void> result = m.execute();
    } catch (NotFoundException ex){
      //ignore.
    } catch (ConnectionException ex) {
      throw new PersistenceException(ex);
    } finally {
View Full Code Here

      while(it.hasNext()) {
        WideRowValue<Ky, Col, Val> value = it.next();
        putColumn(clm, value);
      }
    }
    m.execute();
  }

  protected void putColumn(ColumnListMutation<Col> clm,  WideRowValue<Ky, Col, Val> value) {
    clm.putColumn(value.getColumn(), value.getValue(), getValueSerializer(), null);
  }
View Full Code Here

    for(Ky kee: values.keySet()) {
      WideRowValue<Ky, Col, Val> value = values.get(kee);
      ColumnListMutation<Col> clm = m.withRow(getColumnFamily(), kee);
      putColumn(clm, value);
    }
    m.execute();
  }
 
 
   
  protected void createColumnFamily() {
View Full Code Here

                m.withRow(CF_INDEX, "B_" + (row % SHARD_COUNT)).putColumn(
                        new IndexEntry(value, row), row, null);
            }

            // System.out.println(m);
            m.execute();
        } catch (Exception e) {
            LOG.error(e.getMessage());
            Assert.fail();
        }
    }
View Full Code Here

                            (int) (cName - 'a') + 1, null);
                }
                cfmStandard
                        .putColumn("Index1", (int) (keyName - 'A') + 1, null);
                cfmStandard.putColumn("Index2", 42, null);
                m.execute();
            }

            m.withRow(CF_STANDARD1, "Prefixes").putColumn("Prefix1_a", 1, null)
                    .putColumn("Prefix1_b", 2, null)
                    .putColumn("prefix2_a", 3, null);
View Full Code Here

            m.withRow(CF_STANDARD1, "Prefixes").putColumn("Prefix1_a", 1, null)
                    .putColumn("Prefix1_b", 2, null)
                    .putColumn("prefix2_a", 3, null);

            result = m.execute();

            m.execute();
           
            m = keyspace.prepareMutationBatch();
            for (int i = 0; i < ALL_ROWS_COUNT; i++) {
View Full Code Here

                    .putColumn("Prefix1_b", 2, null)
                    .putColumn("prefix2_a", 3, null);

            result = m.execute();

            m.execute();
           
            m = keyspace.prepareMutationBatch();
            for (int i = 0; i < ALL_ROWS_COUNT; i++) {
                m.withRow(CF_ALL_ROWS,  i).putColumn(0true);
                if (m.getRowCount() == 50) {
View Full Code Here

           
            m = keyspace.prepareMutationBatch();
            for (int i = 0; i < ALL_ROWS_COUNT; i++) {
                m.withRow(CF_ALL_ROWS,  i).putColumn(0true);
                if (m.getRowCount() == 50) {
                    m.execute();
                }
            }
            m.execute();

        } catch (Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.