Skip to content

Instantly share code, notes, and snippets.

View lenards's full-sized avatar

Andrew Lenards lenards

  • Tucson, AZ
View GitHub Profile
@lenards
lenards / console_out.md
Created January 7, 2015 22:28
Adventures of a DSE PySpark newbie on Mac OS X 10.9...

Trying to replicate the examples in Getting started with PySpark on Mac OS X (10.9) using the DMG Installed version of DataStax Enterprise (v4.6.0).

I have dse in the $PATH for the session...

$ echo $PATH 
/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/bin:/Applications/activator-1.2.10/:/Users/andrewlenards/dse/bin

I have created the keyspace "test" and the table "kv":

@lenards
lenards / gist:b260a52f6bbe3758b0d6
Last active August 29, 2015 14:13
What happens when Consistency Level is not met?

Shutdown a node...

$ ccm node3 stop
$ ccm status 
Cluster: 'cascor'
-----------------
node1: UP
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:tcommon="http://rs.tdwg.org/ontology/voc/Common#"
xmlns:tc="http://rs.tdwg.org/ontology/voc/TaxonConcept#">
<tc:TaxonConcept rdf:about="taxonomy:101855 ">
<dcterms:title>Lulworthia uniseptata</dcterms:title>
<dcterms:created>1999-08-16</dcterms:created>
<dcterms:modified>2005-01-19</dcterms:modified>
/**
* Test method for {@link org.ipc.iptol.web.RequestHandlerServlet#uploadFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}.
*/
@Test
public void testUploadFile() {
ServletRunner sr = new ServletRunner();
File testfile = new File("/Users/sriram/Documents/workspace/iPToLWeb/src/test/resources/test.nex");
sr.registerServlet( "fileUploadServlet", RequestHandlerServlet.class.getName());
ServletUnitClient sc = sr.newClient();
WebRequest request = new PostMethodWebRequest("http://localhost:8080/fileUploadServlet");
com.meterware.httpunit.IllegalNonFileParameterException: Parameter 'document' is not a file parameter and may not be set to a file value.
at com.meterware.httpunit.WebRequest.setParameter(WebRequest.java:207)
at org.ipc.iptol.web.test.RequestHandlerServletTest.testUploadFile(RequestHandlerServletTest.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
FATAL: could not create shared memory segment: Invalid argument
DETAIL: Failed system call was shmget(key=5432001, size=8642560, 03600).
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 8642560 bytes), reduce PostgreSQL's shared_buffers parameter (currently 300) and/or its max_connections parameter (currently 203).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared memory configuration.
10-15@16:59:47 WARN (FactoryBeanRegistrySupport.java:59) - FactoryBean threw exception from getObjectType, despite the contract saying
that it should return null if the type of its object cannot be determined yet
java.lang.NullPointerException
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:330)
at org.iplantc.jlrproxytoolkit.factorybean.JLRProxyFactoryBean.getObjectType(JLRProxyFactoryBean.java:18)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBean(FactoryBeanRegistrySupport.java:55)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFac
java.lang.NullPointerException
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:330)
at org.iplantc.jlrproxytoolkit.factorybean.JLRProxyFactoryBean.getObjectType(JLRProxyFactoryBean.java:18)
08:27:29.673 [ERROR] [discoveryenvironment] Uncaught exception escaped
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 59
at java.util.Vector.set(Vector.java:712)
at org.iplantc.phyloviewer.client.tree.viewer.render.LayoutCladogram.setBoundingBox(LayoutCladogram.java:106)
at org.iplantc.phyloviewer.client.tree.viewer.render.LayoutCladogram._layoutNode(LayoutCladogram.java:68)
at org.iplantc.phyloviewer.client.tree.viewer.render.LayoutCladogram.layout(LayoutCladogram.java:58)
at org.iplantc.phyloviewer.client.tree.viewer.TreeWidget.loadFromJSON(TreeWidget.java:119)
at org.iplantc.de.client.views.panels.TreePanel.onRender(TreePanel.java:39)
at com.extjs.gxt.ui.client.widget.Component.render(Component.java:971)
at com.extjs.gxt.ui.client.widget.Layout.renderComponent(Layout.java:362)
package org.iplantc.de.client.views.panels;
import org.iplantc.de.client.ClientAction;
import org.iplantc.de.client.I18N;
import org.iplantc.de.client.formatters.AddQuotesFormatter;
import org.iplantc.de.client.metadata.property.Property;
import org.iplantc.de.client.models.File;
import org.iplantc.de.client.utils.ComponentValueTable;
import org.iplantc.de.client.utils.ComponentValueTableValidator;
import org.iplantc.de.client.utils.ValidatorHelper;
package org.iplantc.de.client.views.panels;
import java.util.ArrayList;
import java.util.List;
import org.iplantc.de.client.I18N;
import org.iplantc.de.client.images.Resources;
import org.iplantc.de.client.models.Job;
import org.iplantc.de.client.models.JsJob;
import org.iplantc.de.client.models.UserInfo;