Skip to content

Instantly share code, notes, and snippets.

Sean Busbey busbey

Block or report user

Report or block busbey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hbase-connectors.jenkins.sh
#!/bin/bash -e
if [[ "true" = "${DEBUG}" ]]; then
set -x
printenv
fi
##To set jenkins Environment Variables:
export TOOLS_HOME=/home/jenkins/tools
export FINDBUGS_HOME=${TOOLS_HOME}/findbugs/latest
View hbase-2.2.0RC0.settings.xml
<settings>
<profiles>
<profile>
<id>apache-hbase-2.2.0RC0</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>hbase-release-2.2.0</id>
View 0 example for compatible rename
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.
View old_slack_files.py
# 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
#
View gist:c4f62d91663067b648a9c44cd4657773
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
View results.md
>>> 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:
@busbey
busbey / avro.patch
Last active Nov 17, 2016 — forked from anonymous/avro.patch
Patch for Avro master to use shaded client from HADOOP-11804
View avro.patch
diff --git a/lang/java/mapred/pom.xml b/lang/java/mapred/pom.xml
index e7e2a3f..f9d868e 100644
--- a/lang/java/mapred/pom.xml
+++ b/lang/java/mapred/pom.xml
@@ -221,9 +221,23 @@
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-client</artifactId>
+ <artifactId>hadoop-client-api</artifactId>
View hbase-precommit-jenkins.sh
#!/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
@busbey
busbey / run_ycsb_with_htrace.sh
Created Dec 14, 2015
ycsb helper with htraced tracing.
View run_ycsb_with_htrace.sh
#!/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
View test_thrift1_over_http.py
#!/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
#
You can’t perform that action at this time.