Using Spring-XD to Load Files into GemFire XD

Posted by: bunkertor

Spring XD Scripts My General Setup Script (I save it in setup.xd and load it via  script –file setup.xd) had config fs –namenode hdfs://pivhdsne:8020 admin config server http://localhost:9393 hadoop fs ls / stream list The Script for Loading a File into GemFireXD via Spring-XD stream create –name fileload –definition "file –dir=/tmp/xd/input/load –outputType=text/plain |  jdbc –tableName=APP.filetest […]

Quick Look: Spring XD

Posted by: bunkertor Pivotal-Field-Engineering/retail-demo-xd   Spring XD:  A really quick way to batch process data from an easy to run shell.   It’s very easy to setup to run a one node version of XD and use it on Windows, Mac or Linux.   Looks like a great […]

Quick Loop: JHipster and Spring Boot Tools

Posted by: bunkertor

Install Yeoman and other JavaScript Tools npm install -g yo npm install -g bower npm install -g grunt-cli npm install -g gulp npm install -g karma npm install jshint npm install -g ngmin Install JHipster npm install -g generator-jhipster Update your version of JHipster with: npm update -g generator-jhipster And then you can update your […]

Quick Look: Mocking Options

Posted by: bunkertor

JMock is cool, because of this awesome book! JMockIt can test private and static doesn’t need to worry about injections, works through class loader mocks statics, 3rd party library, … Mockito vs PowerMock vs JMockit      

Quick Tip: Spring REST Utility for Current HTTP Request

Posted by: bunkertor

Utility Method for Spring REST public static HttpServletRequest getCurrentRequest() { RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); Assert.state(requestAttributes != null, "Could not find current request via RequestContextHolder"); Assert.isInstanceOf(ServletRequestAttributes.class, requestAttributes); HttpServletRequest servletRequest = ((ServletRequestAttributes) requestAttributes).getRequest(); Assert.state(servletRequest != null, "Could not find current HttpServletRequest"); return servletRequest; } Sometimes it’s easier to get the underlying Servlet request to get some headers […]