Skip to content

Instantly share code, notes, and snippets.

View wlk's full-sized avatar
🐒

Wojciech Langiewicz wlk

🐒
View GitHub Profile
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hive.exec.scratchdir</name>
<value>/srv/0/hive-scratch</value>
</property>
@wlk
wlk / gist:1151420
Created August 17, 2011 12:17
Pentaho stacktrace
HiveServerException(message:OK, errorCode:0, SQLState:)
at org.apache.hadoop.hive.service.ThriftHive$fetchOne_result.read(ThriftHive.java:1286)
at org.apache.hadoop.hive.service.ThriftHive$Client.recv_fetchOne(ThriftHive.java:111)
at org.apache.hadoop.hive.service.ThriftHive$Client.fetchOne(ThriftHive.java:90)
at org.apache.hadoop.hive.jdbc.HiveResultSet.next(HiveResultSet.java:1331)
at org.pentaho.platform.plugin.services.connections.sql.SQLResultSet.next(SQLResultSet.java:111)
at org.pentaho.platform.plugin.action.pentahometadata.MetadataQueryComponent.execute(MetadataQueryComponent.java:238)
at org.pentaho.platform.plugin.action.pentahometadata.MQLRelationalDataComponent.executeAction(MQLRelationalDataComponent.java:111)
at org.pentaho.platform.engine.services.solution.ComponentBase.execute(ComponentBase.java:463)
at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeComponent(RuntimeContext.java:1293)
@wlk
wlk / pom.xml
Created February 7, 2012 14:56
example pom
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>pl.nk.warehouse</groupId>
<artifactId>openddr-http</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>openddr-http</name>
<description>OpenDDR HTTP API server and client</description>
<organization>
<name>Nasza Klasa sp. z o. o.</name>
<url>http://nk.pl</url>
2012-11-23 05:05:12,904 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Roll Edit Log from 192.168.1.123
2012-11-23 05:05:12,904 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Rolling edit logs.
2012-11-23 05:05:12,904 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Ending log segment 10809521
2012-11-23 05:05:12,907 INFO org.apache.hadoop.hdfs.server.namenode.FSEditLog: Number of transactions: 346 Total time for transactions(ms): 9Number of transactions batched in Syncs: 3 Number of syncs: 234 SyncTimes(ms): 2679 360 1942
2012-11-23 05:05:12,909 INFO org.apache.hadoop.hdfs.server.namenode.FileJournalManager: Finalizing edits file /mnt/nfs-client/edits/current/edits_inprogress_0000000000010809521 -> /mnt/nfs-client/edits/current/edits_0000000000010809521-0000000000010809866
2012-11-23 05:05:12,911 INFO org.apache.hadoop.hdfs.server.namenode.FileJournalManager: Finalizing edits file /srv/0/dfs/nn/current/edits_inprogress_0000000000010809521 -> /srv/0/dfs/nn/current/edits_0000000000010
2012-11-24 07:48:14,119 INFO org.apache.hadoop.hdfs.server.namenode.FSImage: Edits file /mnt/nfs-client/edits/current/edits_0000000000011026202-0000000000011026524 of size 31752 edits # 323 loaded in 0 seconds.
2012-11-24 07:48:14,134 INFO org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer: Loaded 323 edits starting from txid 11026201
201
....
2012-11-24 07:50:14,935 INFO org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer: Triggering log roll on remote NameNode namenode/192.168.1.122:8020
2012-11-24 07:50:16,988 INFO org.apache.hadoop.hdfs.server.namenode.FSImage: Reading /mnt/nfs-client/edits/current/edits_0000000000011026525-0000000000011026975 expecting start txid #11026525
2
2012-09-19 03:35:04,520 INFO org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer: Loaded 4 edits starting from txid 3073005
2012-09-19 03:37:14,673 INFO org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer: Triggering log roll on remote NameNode namenode/192.168.1.120:8020
2012-09-19 03:37:24,887 INFO org.apache.hadoop.hdfs.server.namenode.FSImage: Reading /mnt/nfs-client/edits/current/edits_0000000000003073010-0000000000003073011 expecting start txid #3073010
2012-09-19 03:37:24,887 INFO org.apache.hadoop.hdfs.server.namenode.FSImage: Edits file /mnt/nfs-client/edits/current/edits_0000000000003073010-0000000000003073011 of size 30 edits # 2 loaded in 0 seconds.
2012-09-19 03:37:24,892 INFO org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer: Loaded 2 edits starting from txid 3073009
2012-09-19 03:37:53,771 INFO org.apache.hadoop.hdfs.server.namenode.ha.StandbyCheckpointer: Triggering checkpoint because it has been 3645 seconds since the last checkpoint, which exceeds the configured interval 3600
root@hd1:~# jstack -F 4284
Attaching to process ID 4284, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 20.6-b01
Deadlock Detection:
No deadlocks found.
Thread 1204: (state = BLOCKED)
@wlk
wlk / rrdxml.py
Created April 12, 2013 13:29 — forked from afternoon/rrdxml.py
#!/usr/bin/env python
"""Export CSV from an RRD XML dump.
Usage: rrdxml.py file.xml rra
Where rra is the 0-based index for the RRA you want to dump.
"""
from csv import writer
from itertools import chain, izip
@wlk
wlk / gist:5f699283acc580fe2199
Created March 10, 2016 08:05 — forked from VladUreche/gist:8396624
Scaladoc tutorial for docs.scala-lang.org, in a pitiful state

Scaladoc Developer Guide

Introduction

Scaladoc is the tool that enables developers to automatically generate documentation for their Scala (and Java) projects. It is Scala's equivalent of the widely-used Javadoc tool. This means that Javadoc (and even doxygen) users will be familiar with Scaladoc from day 1: for them, it is most beneficial to check out the Scaladoc/Javadoc comparison tables and if necessary, skim through this document to understand specific features.

The rest of this tutorial is aimed at developers new to Scaladoc and other similar tools. It assumes a basic understanding of the Scala language, which is necessary to follow the examples given throughout the tutorial. For the user perspective on the Scaladoc-generated documentation, such as finding a class, understanding the page layout, navigating through diagrams, please refer to the Scaladoc User Guide.

The tutorial will start by a short motivation and then will explain the main concept in Scaladoc: the doc comment.

Why document?

import scala.util.Random
object Suit {
val suits = List(Clubs, Spades, Hearts, Diamonds)
}
sealed abstract class Suit
case object Clubs extends Suit
case object Spades extends Suit
case object Hearts extends Suit