This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (C) 2013 Couchbase, Inc. | |
* | |
* 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: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers; | |
import play.libs.F; | |
import play.mvc.*; | |
public class Application extends Controller { | |
public static WebSocket<String> index() { | |
return new WebSocket<String>() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.couchbase.client.CouchbaseClient; | |
import com.couchbase.client.CouchbaseConnectionFactory; | |
import com.couchbase.client.CouchbaseConnectionFactoryBuilder; | |
import com.couchbase.client.ObservedException; | |
import com.couchbase.client.ObservedModifiedException; | |
import com.couchbase.client.ObservedTimeoutException; | |
import net.spy.memcached.CASResponse; | |
import net.spy.memcached.PersistTo; | |
import net.spy.memcached.ReplicateTo; | |
import net.spy.memcached.internal.OperationCompletionListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example.couchbase; | |
import io.netty.buffer.ByteBuf; | |
import io.netty.buffer.Unpooled; | |
import reactor.core.Environment; | |
import reactor.core.Reactor; | |
import reactor.core.spec.Reactors; | |
import reactor.event.Event; | |
import reactor.function.Consumer; | |
import reactor.tcp.TcpClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java -ea -Didea.launcher.port=7534 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 12.app/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA 12.app/lib/idea_rt.jar:/Applications/IntelliJ IDEA 12.app/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Conte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2012 The Netty Project | |
* | |
* The Netty Project 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 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[cloudera@localhost Downloads]$ file /home/cloudera/.password | |
/home/cloudera/.password: ASCII text | |
[cloudera@localhost Downloads]$ sqoop export --username hadoop --password-file ~/.password --table ignored --connect http://192.168.1.100:8091/pools --export-dir couchbase_hello_world --verbose --input-fields-terminated-by '\t' --lines-terminated-by '\n' | |
13/11/06 05:18:04 DEBUG tool.BaseSqoopTool: Enabled debug logging. | |
13/11/06 05:18:04 DEBUG util.CredentialsUtil: Fetching password from specified path: /home/cloudera/.password | |
13/11/06 05:18:05 WARN tool.BaseSqoopTool: Failed to load connection parameter file | |
java.io.IOException: The password file does not exist! /home/cloudera/.password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected final ByteBuf SPACE = Unpooled.copiedBuffer(" ", CharsetUtil.UTF_8); | |
and | |
buffer.writeBytes(msg.getCmd().getValue().getBytes(CharsetUtil.UTF_8)); | |
buffer.writeBytes(SPACE.copy()); | |
buffer.writeBytes(msg.getKey().getBytes(CharsetUtil.UTF_8)); | |
buffer.writeBytes(SPACE.copy()); | |
buffer.writeInt(msg.getFlags()); | |
buffer.writeBytes(SPACE.copy()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.couchbase.client.http.HttpResponseCallback; | |
import com.couchbase.client.http.HttpUtil; | |
import com.couchbase.client.protocol.views.HttpOperation; | |
import com.couchbase.client.vbucket.Reconfigurable; | |
import com.couchbase.client.vbucket.config.Bucket; | |
import com.couchbase.client.vbucket.config.DefaultConfig; | |
import java.io.IOException; | |
import java.io.InterruptedIOException; | |
import java.io.UnsupportedEncodingException; | |
import java.net.InetSocketAddress; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2013-12-18 11:06:47.255 ERROR 18276 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy] with root cause | |
java.lang.ClassNotFoundException: org.hibernate.proxy.HibernateProxy | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:425) | |
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:358) |