Skip to content

Instantly share code, notes, and snippets.

View busbey's full-sized avatar

Sean Busbey busbey

  • Champaign, IL USA
View GitHub Profile
@busbey
busbey / Prerequisites for Windows.md
Last active August 29, 2015 14:24
Proposed "Prerequisites for Windows" documentation

YCSB is made to run on Windows systems given some additional software. The following instructions are broken into sections based on running from an existing release and building from the source. Users are encouraged to rely on published releases where possible.

Running from a release

These instructions cover running the YCSB client on your Windows machine. It does not cover any steps needed to run any datastore instances you may wish to evaluate. Please see the documentation for a given datastore to see what steps are needed to run an instance on Windows.

Needed software

Java Runtime Environment

@busbey
busbey / host_offset.txt
Last active August 3, 2021 19:01
Helper for running YCSB "Core Workloads" on multiple hosts.
client-1.example.com:0
client-2.example.com:429496729
client-3.example.com:858993458
client-4.example.com:1288490187
client-5.example.com:1717986916
@busbey
busbey / different_commiters.sh
Last active October 29, 2015 05:27
"how often is a commit pushed by a different person?"
#!/bin/bash
# "how often is a commit pushed by a different person?"
# or at the least, a different email address.
#
# by convention in RtC projects, git workflows for committers often end up looking like:
# * post patch to jira/reviewboard/phabricator/gerrit
# * other committer +1s
# * committer pushes commit to repo
#
# by contrast, for a non-committer is looks like:
#!/usr/bin/env python
# Copyright 2015 Cloudera. all rights reserved
#
# Cloudera, Inc. 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
#
@busbey
busbey / run_ycsb_with_htrace.sh
Created December 14, 2015 15:46
ycsb helper with htraced tracing.
#!/bin/bash
# Copyright (c) 2015 Cloudera, Inc. All rights reserved.
#
# Licensed 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
#
# Unless required by applicable law or agreed to in writing, software
#!/bin/bash -e
if [[ "true" = "${DEBUG}" ]]; then
set -x
fi
##To set jenkins Environment Variables:
export TOOLS_HOME=/home/jenkins/tools
export JAVA_HOME=${TOOLS_HOME}/java/jdk1.7.0_79
export FINDBUGS_HOME=${TOOLS_HOME}/findbugs/latest
>>> import jenkins
>>> server = jenkins.Jenkins('https://builds.apache.org/')
>>> job_info = server.get_job_info('PreCommit-HBASE-Build', 1, True)
>>> builds = [catch(lambda : server.get_build_info('PreCommit-HBASE-Build', x['number'])) for x in job_info['builds']]
>>> for build in builds:
... if build['result'] == 'SUCCESS':
... host_counts[build['builtOn']]['success']+=1
... elif build['result'] == 'FAILURE':
... for test_log in [artifact for artifact in build['artifacts'] if artifact['fileName'].startswith('patch-unit')]:
... try:
hbase(main):002:0> create 't1', 'family', 'access'
hbase(main):006:0> put = org.apache.hadoop.hbase.client.Put.new("row1".to_java_bytes)
hbase(main):008:0> put.add_column("family".to_java_bytes, "column1".to_java_bytes, "a value".to_java_bytes)
=> #<Java::OrgApacheHadoopHbaseClient::Put:0x648855fd>
hbase(main):009:0> put.add_column("family".to_java_bytes, "column2".to_java_bytes, "another value".to_java_bytes)
=> #<Java::OrgApacheHadoopHbaseClient::Put:0x648855fd>
hbase(main):010:0> put.add_column("access".to_java_bytes, nil, "@group1".to_java_bytes)
=> #<Java::OrgApacheHadoopHbaseClient::Put:0x648855fd>
hbase(main):012:0> get_table("t1").table.put(put)
0 row(s) in 0.0010 seconds
# Run with --help for cli options
#
# Look below for the section marked XXX on how to enable deletes
#
# python2 old_slack_files.py --aggregate-by-type --domain example path/to/my/example.oauth.token.file
#
# Original content from
#
# https://www.shiftedup.com/2014/11/13/how-to-bulk-remove-files-from-slack
#
@busbey
busbey / 0 example for compatible rename
Last active March 1, 2019 23:02
mike had a question
Let's walk through renaming a class in a way that maintains compatibility for a factory class!
Licensed under the MIT license (https://opensource.org/licenses/MIT)
Copyright 2019 Sean Busbey
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.