After installing PHD add on for Pivotal Cloud Foundry 1.1 I quickly created some development services for PHD using the CLI as shown below.[Tue Apr 15 22:40:08 papicella@:~/vmware/pivotal/products/cloud-foundry ] $ cf create-service p-hd-hawq-cf free dev-hawqCreating service dev-hawq in org pivotal / space development as pas...OK[Tue Apr 15 22:42:31 papicella@:~/vmware/pivotal/products/cloud-foundry ] $ cf create-service p-hd-hbase-cf free dev-hbaseCreating service dev-hbase in org pivotal / space development as pas...OK[Tue Apr (more...)
I recently needed to setup a cron script which loaded CSV files from a directory into Greenplum every 2 minutes. Once loaded the files are moved onto Hadoop for archive purposes. The config below shows how to use GPLOAD data load utility which utilises GPFDIST.
1. Create a load table. In this example the data is then moved to the FACT table once the load is complete
drop table rtiadmin.rtitrans_etl4;
CREATE TABLE rtiadmin.rtitrans_etl4 (more...)
PCF AWS marketplace provides app direct services and in this example I am going to use the "newrelic
" monitoring service to monitor my spring based java application. It's really this simple.
1. Create a service as shown below.[Tue Mar 04 17:19:34 papicella@:~/cfapps/spring-travel ] $ cf create-service newrelic standard dev-newrelic
2. Create a manifest.yml for my spring application which uses the new relic service above.applications:- name: pas-springtravel memory: 1024M (more...)
I previously showed how to create a connection in IntelliJ IDEA to Cloud Foundry v2 in the post below.http://theblasfrompas.blogspot.com.au/2014/02/intellij-idea-version-13-now-includes.html
With a Cloud Foundry CLOUD connection we can now PUSH our application directly from the IDE as shown below.
1. Create a run configuration for your project as shown below. We also specify the memory and number of instances on this page as part of the push / deployment process.
Just installed IntelliJ IDEA version 13 and found that it now includes a CloudFoundry connection type. You define it under IDE settings as shown below.
Will test deploying to the publicly hosted AWS Cloud Foundry using this connection at some stage.
By creating a manifest as follows we can push multiple applications in one go as shown below.
1. manifest.ymlapplications:- name: pas-props memory: 256M instances: 1 host: pas-props domain: cfapps.io path: ./props.war- name: pas-httpsession memory: 256M instances: 1 host: pas-httpsession domain: cfapps.io path: ./haclusterdemo.war
2. Push as follows[Thu Feb 20 14:48:45 papicella@:~/vmware/pivotal/products/cloud-foundry/apps/other ] $ cf push -f (more...)
I previously blogged how to PUSH an application into PCF , then bind services as shown below.
If you want to do this in one step simply create a manifest file as shown below. This example isn't the spring books application but shows you what your manifest.yml would look like with services included so you could then create one similar to that below.
I decided to install the new CF v6 CLI for PCF (Pivotal Cloud Foundry). Given this will be the new CLI for PCF here is how it differs to the old Ruby CLI. In this example I deploy / push a spring based application and bind it to existing services.
To download and install the new CLI v6 use the link below.http://docs.cloudfoundry.com/docs/using/managing-apps/cf/go-cli.html
In this example we have the following 2 services (more...)
In this example below I show how you would create a user defined service for Oracle 11g R2 which is running outside of the PCF instance and how your applications would bind to that service. The example below is from the spring-music sample application which is a spring based web application.https://github.com/cloudfoundry-samples/spring-music
1. First lets create our user defined service for Oracle , here we just use a simple URI which the Spring Cloud (more...)
Thymeleaf offers a set of Spring integrations that allow you to use it as a full-featured substitute for JSP in Spring MVC applications.
So here is a simple example just so we can compare how things differ in HTML versus JSP, does remind me of JSF / Viewlets to be honest.
1. Let start with what our simple project looks like in IntelliJ
2. The web.xml is defined as follows
Spring XD comes with several batch import and export modules. You can run them out of the box and show using the "Import CSV Files to JDBC (filejdbc)" as shown below.
This example show's inserting data into GemFireXD, you can use any RDBMS which supports a JDBC driver.Note: XD_BASE = /Users/papicella/vmware/software/spring/spring-xd-1.0.0.M4
1. Configure connection to RDBMS in "$XD_BASE/xd/config/batch-jdbc-import.properties
".# Setting for the JDBC batch import job moduledriverClass=com. (more...)
The following examples shows what we can do out of the box with SpringXD TAIL input source and JDBC sink as the output source. This can all be done without writing and code.
Assumes you have SpringXD installed and GemFireXD installed. See the getting stared guide
which explains how to setup SpringXD. As for a database output for JDBC you can use any RDBMS here so you could use MYSQL , ORACLE etc if you (more...)
Like GemFire 7 , GemFireXD now includes Pulse. GemFire XD Pulse
is a Web Application that provides a graphical dashboard for monitoring vital, real-time health and performance of GemFire XD clusters, members, and tables.
to examine total memory, CPU, and disk space used by members, uptime (more...)
The CREATE TYPE
s a user-defined type
(UDT). A UDT is a serializable Java class whose instances are stored in columns. The class must implement the java.io.Serializable
interface. In this example below we create a TYPE with just one string property to highlight how (more...)
Previously I blogged about using the HikariCP with Pivotal GemFireXD as per the post below.http://theblasfrompas.blogspot.com.au/2013/12/hikaricp-connection-pool-with-pivotal.html
In this example I show how you would use this Connection Pool with Spring.
1. Ensure your using version 1.2.1 of HikariCP as it provides the setDataSourceProperties() setter to HikariConfig (more...)
I decided to try out the HikariCP as per the link below it says it's the fastest Connection Pool and the most lightweight. It probably is so I thought I would set it up for GemFireXD.
Quote: There is nothing faster.1
There is nothing more correct. HikariCP is a "zero-overhead" production-quality (more...)
We recently released Pivotal GemFireXD BETA with the latest release of Pivotal HD. Pivotal GemFire XD is a memory-optimized, distributed data store that is designed for applications that have demanding scalability and availability requirements. With GemFire XD you can manage data entirely using in-memory tables, or you can persist very (more...)
Not all SQL databases provide a Boolean data type and SQLFire which uses Derby has no BOOLEAN data type. In order to use BOOLEAN you can use a SMALLINT using values as 0 or 1 and then make API calls with the JDBC driver calling ResultSet.getBoolean() to give you (more...)
When you use SQLFire as a cache, you can configure a SQL data
loader that is triggered to load data from a backend repository on a miss in
SQLFire. When an incoming query request for a uniquely-identified row cannot be
satisfied by the distributed cache, the loader is invoked to (more...)
In this example we will show how we can determine which data format to return writing just a single controller method. In this example we either return XML or JSON and the system knows whether to convert to XML or JSON because of content negotiation. This example is based on the (more...)