本文整理汇总了Java中com.netflix.astyanax.ColumnListMutation.deleteColumn方法的典型用法代码示例。如果您正苦于以下问题:Java ColumnListMutation.deleteColumn方法的具体用法?Java ColumnListMutation.deleteColumn怎么用?Java ColumnListMutation.deleteColumn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.netflix.astyanax.ColumnListMutation
的用法示例。
在下文中一共展示了ColumnListMutation.deleteColumn方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deleteColumn
import com.netflix.astyanax.ColumnListMutation; //导入方法依赖的package包/类
@Override
public void deleteColumn(String key, String column) throws PaasException {
LOG.info("Update row");
invariant();
MutationBatch mb = keyspace.prepareMutationBatch();
ColumnListMutation<ByteBuffer> mbRow = mb.withRow(this.columnFamily, serializers.keyAsByteBuffer(key));
mbRow.deleteColumn(serializers.columnAsByteBuffer(column));
try {
mb.execute();
} catch (ConnectionException e) {
throw new PaasException(
String.format("Failed to update row '%s' in column family '%s.%s'" ,
key, this.keyspace.getKeyspaceName(), this.columnFamily.getName()),
e);
}
}
示例2: removeColumns
import com.netflix.astyanax.ColumnListMutation; //导入方法依赖的package包/类
private void removeColumns(Remove action, ColumnFamily cf, MutationBatch m) {
ColumnListMutation row = m.withRow(cf, action.getRowKey());
for(byte[] name : action.getColumns()) {
row.deleteColumn(name);
}
}
示例3: removeColumn
import com.netflix.astyanax.ColumnListMutation; //导入方法依赖的package包/类
private void removeColumn(RemoveColumn action, MetaLookup mgr, MutationBatch m) {
Info info = columnFamilies.fetchColumnFamilyInfo(action.getColFamily().getColumnFamily(), mgr);
if(info == null)
return; //if no cf exist/returned, nothing to do
ColumnFamily cf = info.getColumnFamilyObj();
ColumnListMutation row = m.withRow(cf, action.getRowKey());
if(row == null)
return;
byte[] name = action.getColumn();
row.deleteColumn(name);
}
示例4: removeIndex
import com.netflix.astyanax.ColumnListMutation; //导入方法依赖的package包/类
private void removeIndex(RemoveIndex action, MetaLookup mgr, MutationBatch m) {
String indexCfName = action.getIndexCfName();
if (indexCfName.equalsIgnoreCase("BytesIndice"))
return;
Info info = columnFamilies.fetchColumnFamilyInfo(indexCfName, mgr);
if(info == null)
return; //nothing to do since it doesn't exist
ColumnFamily cf = info.getColumnFamilyObj();
ColumnListMutation colMutation = m.withRow(cf, action.getRowKey());
Object toRemove = createObjectToUse(action, info);
colMutation.deleteColumn(toRemove);
}
示例5: removeContentRef
import com.netflix.astyanax.ColumnListMutation; //导入方法依赖的package包/类
private void removeContentRef(ContainerRef containerRef, ContentRef contentRef,
MutationBatch batch) {
Long rowId = containerRef.getId().longValue();
String columnId = contentRef.getId().toString();
ColumnListMutation<String> mutation = batch.withRow(mainCf, rowId);
mutation.deleteColumn(columnId);
}
示例6: removeItemSummaries
import com.netflix.astyanax.ColumnListMutation; //导入方法依赖的package包/类
private void removeItemSummaries(ContainerRef containerRef, ItemRef itemRef,
MutationBatch batch) {
Long rowId = containerRef.getId().longValue();
ColumnListMutation<String> mutation = batch.withRow(mainCf, rowId);
mutation.deleteColumn(AstyanaxProtobufContentMarshaller.buildItemSummaryKey(
itemRef.getId().longValue())
);
}
示例7: removeAvailableContent
import com.netflix.astyanax.ColumnListMutation; //导入方法依赖的package包/类
private void removeAvailableContent(ContainerRef containerRef, ItemRef itemRef,
MutationBatch batch) {
Long rowId = containerRef.getId().longValue();
ColumnListMutation<String> mutation = batch.withRow(mainCf, rowId);
mutation.deleteColumn(AstyanaxProtobufContentMarshaller.buildAvailableContentKey(
itemRef.getId().longValue())
);
}
示例8: removeUpcomingContent
import com.netflix.astyanax.ColumnListMutation; //导入方法依赖的package包/类
private void removeUpcomingContent(ContainerRef brancontainerRefRef, ItemRef itemRef,
MutationBatch batch) {
Long rowId = brancontainerRefRef.getId().longValue();
ColumnListMutation<String> mutation = batch.withRow(mainCf, rowId);
mutation.deleteColumn(AstyanaxProtobufContentMarshaller.buildUpcomingContentKey(
itemRef.getId().longValue())
);
}
示例9: run
import com.netflix.astyanax.ColumnListMutation; //导入方法依赖的package包/类
@Override
protected Void run() throws Exception {
MutationBatch m = keyspace.prepareMutationBatch();
ColumnListMutation<String> mutation = m.withRow(columnFamily, rowKey);
for (String column: columnNames) {
mutation = mutation.deleteColumn(column);
}
m.execute();
return null;
}
示例10: removeColumn
import com.netflix.astyanax.ColumnListMutation; //导入方法依赖的package包/类
private void removeColumn(ColumnListMutation<String> mutation, String column) {
mutation.deleteColumn(column);
}