Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View dvimont's full-sized avatar

Daniel H. Vimont dvimont

View GitHub Profile
@dvimont
dvimont / indexedCollectionExample
Last active August 29, 2015 14:20
IndexedCollection simple usage example
package org.commonvox.indexedcollectionexample;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.commonvox.indexedcollection.CompositeIndex;
import org.commonvox.indexedcollection.IndexedCollection;
/**
* This is a simple example of constructing and querying an IndexedCollection.
@dvimont
dvimont / HBaseShellSimpleEmulator
Last active September 28, 2022 07:50
HBase shell emulator (an aid to understanding the HBase data model)
import java.util.TreeMap;
import java.util.concurrent.TimeUnit;
/**
* This code was created to help its author to internalize and more deeply
* understand the fundamental constructs of the Data Model of the HBase
* database system. It is provided here in the event that it may prove useful
* to others engaging in similar explorations. The descriptive comments that
* follow may prove helpful, and those with basic Java programming skills may
* also find it useful to experiment with the create, list, put, scan, and get
@dvimont
dvimont / HelloWorldForHBase.java
Last active October 1, 2018 01:00
Hello World for HBase
/**
* This brief HELLO WORLD Java program is meant to enable you to very quickly
* gain a rudimentary, hands-on understanding of how data (and metadata) is
* stored and retrieved in HBase via the "client API".
*
* PART 1: CONCEPTS
* ================
* For those coming to the HBase world with previous experience in traditional
* RDBMS databases, it is essential to realize that Tables, Rows, and Columns
* in HBase, while bearing some resemblance to their namesakes in the RDBMS
@dvimont
dvimont / HbaseTableValidator
Last active August 29, 2015 14:23
Check whether HBase table exists
import java.io.IOException;
import org.apache.hadoop.hbase.TableNotFoundException;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Table;
import org.apache.hadoop.hbase.util.Bytes;
/** The following was coded using HBase 1.0.1.1 */
public class HbaseTableValidator {
private static final Get DUMMY_GET = new Get(Bytes.toBytes(0));
package org.commonvox.collections.gists;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
@dvimont
dvimont / OrderedSetEmployeeGist.java
Last active April 12, 2016 02:49
Additional OrderedSet usage examples (for https://github.com/dvimont/OrderedSet)
package org.commonvox.collections.gists;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
import org.commonvox.collections.KeyComponentProfile;
import org.commonvox.collections.OrderedSet;
package org.commonvox.hbase_column_manager_gist;
import java.io.File;
import java.io.IOException;
import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.NamespaceDescriptor;
import org.apache.hadoop.hbase.NamespaceNotFoundException;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Admin;
package org.commonvox.hbase_column_manager_gist;
import java.io.IOException;
import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.NamespaceDescriptor;
import org.apache.hadoop.hbase.NamespaceNotFoundException;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Admin;
import org.apache.hadoop.hbase.client.Connection;