This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package datawave.query.tables; | |
import com.esotericsoftware.kryo.Kryo; | |
import com.esotericsoftware.kryo.io.Input; | |
import com.google.gson.JsonObject; | |
import com.google.gson.JsonParser; | |
import datawave.data.type.NoOpType; | |
import datawave.query.DocumentSerialization; | |
import datawave.query.attributes.Document; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
writer = AccumuloWriter(args.instance,args.zookeepers,args.username,password,table,"") | |
for i in range(5000): | |
writer.put("q",cf="cf" + str(i),cq="cq") | |
writer.put("q",cf="cf2"+ str(i),cq="cq") | |
writer.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Disable some unneeded services by default (administrators can re-enable if desired) | |
systemctl disable firewalld | |
# Update memory limits | |
cat << EOF >> /etc/security/limits.conf | |
* hard memlock unlimited | |
* soft memlock unlimited | |
* hard nofile 655350 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index meta 8969415289 | |
00850_1961038767_001_0000_0 date: [] 9223372036854775807 | |
00850_1961038767_001_0000_0 query_string: [] 9223372036854775807 | |
00850_1961038767_001_0000_0 sentiment: [] 9223372036854775807 | |
00850_1961038767_001_0000_0 text: [] 9223372036854775807 | |
00850_1961038767_001_0000_0 user: [] 9223372036854775807 | |
00850_1961038767_001_0000_1 date: [] 9223372036854775807 | |
00850_1961038767_001_0000_1 query_string: [] 9223372036854775807 | |
00850_1961038767_001_0000_1 sentiment: [] 9223372036854775807 | |
00850_1961038767_001_0000_1 text: [] 9223372036854775807 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AccumuloConfiguration accconf = DefaultConfiguration.getInstance(); | |
SortedMap<Key, Value> map = new TreeMap<>(); | |
FileSKVIterator reader = RFileOperations.getInstance().newScanReaderBuilder().forFile(file, FileSystem.get(new URI(file), conf), conf, CryptoServiceFactory.newDefaultInstance()).withTableConfiguration(accconf).overRange(new Range(), Collections.emptySet(), false).build(); | |
Authorizations auths = new Authorizations("RST"); | |
SortedKeyValueIterator<Key, Value> filter = VisibilityFilter.wrap(reader, auths, "".getBytes()); | |
long count = 0; | |
while (filter.hasTop()) { | |
Key key = filter.getTopKey(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uid.List v = Uid.List.parseFrom(value.get()); | |
for (String uid : v.getUIDList()) { | |
// uid to look up in shard | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by the protocol buffer compiler. DO NOT EDIT! | |
// source: Uid.proto | |
package datawave.ingest.protobuf; | |
public final class Uid { | |
private Uid() {} | |
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from org.poma.accumulo import Key,KeyValue | |
from org.apache.accumulo.core.data import Range,Value | |
from org.apache.hadoop.io import WritableUtils | |
from java.io import ByteArrayInputStream, DataInputStream | |
import struct | |
import json | |
def swap32(i): | |
return struct.unpack("<L", struct.pack(">L", i))[0] |
NewerOlder