Skip to content

Instantly share code, notes, and snippets.

View jatrost's full-sized avatar

Jason Trost jatrost

View GitHub Profile
@jatrost
jatrost / gist:1779397
Created February 9, 2012 11:24
nutch patch
diff --git a/src/java/org/apache/nutch/storage/StorageUtils.java b/src/java/org/apache/nutch/storage/StorageUtils.java
index de740b5..19b37ad 100644
--- a/src/java/org/apache/nutch/storage/StorageUtils.java
+++ b/src/java/org/apache/nutch/storage/StorageUtils.java
@@ -40,8 +40,9 @@ public class StorageUtils {
Class<K> keyClass, Class<V> persistentClass) throws ClassNotFoundException, GoraException {
Class<? extends DataStore<K, V>> dataStoreClass =
(Class<? extends DataStore<K, V>>) getDataStoreClass(conf);
+
return DataStoreFactory.createDataStore(dataStoreClass,
<gora-orm>
<table name="webpage">
<config key="table.file.compress.blocksize" value="32K"/>
</table>
<class table="webpage" keyClass="java.lang.String"
name="org.apache.nutch.storage.WebPage">
<!-- fetch fields -->
<field name="baseUrl" family="f" qualifier="bas"/>
<field name="status" family="f" qualifier="st"/>
gora.datastore.default=org.apache.gora.accumulo.store.AccumuloStore
gora.datastore.accumulo.mock=false
gora.datastore.accumulo.instance=inst
gora.datastore.accumulo.zookeepers=localhost
gora.datastore.accumulo.user=root
gora.datastore.accumulo.password=secret
gora.datastore.accumulo.zookeepers=127.0.0.1:2181
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>storage.data.store.class</name>
<value>org.apache.gora.accumulo.store.AccumuloStore</value>
</property>
<property>
<name>http.agent.name</name>
<value>Nutch</value>
<dependency org="org.apache.accumulo" name="accumulo-core" rev="1.5.0-incubating-SNAPSHOT" />
<dependency org="org.apache.accumulo" name="cloudtrace" rev="1.5.0-incubating-SNAPSHOT" />
<dependency org="org.apache.thrift" name="libthrift" rev="0.6.1" />
<dependency org="org.apache.gora" name="gora-accumulo" rev="0.2-SNAPSHOT" />
<dependency org="org.apache.zookeeper" name="zookeeper" rev="3.4.3" />
package accumulo;
import java.util.Map.Entry;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Instance;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.mock.MockInstance;
import org.apache.accumulo.core.data.Key;
Ingesting data ...
Reading data ...
Exception in thread "org.apache.accumulo.start.classloader.AccumuloFilesystemAlterationMonitor" java.lang.NullPointerException
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl$MonitorFileImpl.listFiles(FilesystemAlterationObserverImpl.java:64)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl$Entry.compareChilds(FilesystemAlterationObserverImpl.java:119)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl$Entry.needsToBeDeleted(FilesystemAlterationObserverImpl.java:203)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl$Entry.compareChilds(FilesystemAlterationObserverImpl.java:137)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl$Entry.needsToBeDeleted(FilesystemAlterationObserverImpl.java:203)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverImpl$Entry.compareChilds(FilesystemAlterationObserverImpl.java:137)
at org.apache.commons.jci.monitor.FilesystemAlterationObserverI
Shell - Accumulo Interactive Shell
-
- version: 1.5.0-incubating-SNAPSHOT
- instance name: inst
- instance id: ce63fe79-6624-46c7-98a5-c6a98b8cfcef
-
- type 'help' for a list of available commands
-
root@inst> table webpage
root@inst webpage> scan
@jatrost
jatrost / ivy-1.1.3.xml
Created February 28, 2012 11:50
$HOME/.ivy2/cache/jaxen/jaxen/ivy-1.1.3.xml
<!-- <dependency org="maven-plugins" name="maven-cobertura-plugin" rev="1.3" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)">
<artifact name="maven-cobertura-plugin" type="plugin" ext="plugin" conf=""/>
</dependency>
<dependency org="maven-plugins" name="maven-findbugs-plugin" rev="1.3.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)">
<artifact name="maven-findbugs-plugin" type="plugin" ext="plugin" conf=""/>
</dependency>
-->
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: FAILED DOWNLOADS ::
[ivy:resolve] :: ^ see resolution messages for details ^ ::
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: maven-plugins#maven-cobertura-plugin;1.3!maven-cobertura-plugin.plugin
[ivy:resolve] :: maven-plugins#maven-findbugs-plugin;1.3.1!maven-findbugs-plugin.plugin
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::