-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8060d39
Showing
18 changed files
with
906 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*.idea | ||
*.idea/** | ||
*.iml | ||
*.ipr | ||
target | ||
*.project | ||
*.classpath | ||
*.iws | ||
*.settings/** | ||
*.log | ||
*.log.gz | ||
rebel.xml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Use https://github.com/sakserv/hadoop-mini-clusters | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,258 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>fr.jetoile.sample</groupId> | ||
<artifactId>hadoop-bootstrap</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<scm> | ||
<connection>scm:git:https://git@github.com/jetoile/hadoop-bootstrap.git</connection> | ||
<tag>HEAD</tag> | ||
</scm> | ||
|
||
|
||
<properties> | ||
|
||
<java.version>1.8</java.version> | ||
|
||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
|
||
<slf4j.version>1.7.12</slf4j.version> | ||
<logback-classic.version>1.1.3</logback-classic.version> | ||
|
||
|
||
<commons-io.version>2.4</commons-io.version> | ||
<commons-configuration.version>1.10</commons-configuration.version> | ||
<commons-collections.version>3.2.1</commons-collections.version> | ||
</properties> | ||
|
||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>com.github.sakserv</groupId> | ||
<artifactId>hadoop-mini-clusters-hivemetastore</artifactId> | ||
<version>0.1.3</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.github.sakserv</groupId> | ||
<artifactId>hadoop-mini-clusters-hiveserver2</artifactId> | ||
<version>0.1.3</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.github.sakserv</groupId> | ||
<artifactId>hadoop-mini-clusters-zookeeper</artifactId> | ||
<version>0.1.3</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>commons-configuration</groupId> | ||
<artifactId>commons-configuration</artifactId> | ||
<version>${commons-configuration.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>commons-collections</groupId> | ||
<artifactId>commons-collections</artifactId> | ||
<version>${commons-collections.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>commons-io</groupId> | ||
<artifactId>commons-io</artifactId> | ||
<version>${commons-io.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>${slf4j.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>${logback-classic.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>1.16.6</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- Dependances autres - test --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.11</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.easytesting</groupId> | ||
<artifactId>fest-assert</artifactId> | ||
<version>1.4</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-all</artifactId> | ||
<version>1.8.5</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>2.4</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.0</version> | ||
<configuration> | ||
<source>${java.version}</source> | ||
<target>${java.version}</target> | ||
<!--<encoding>ISO-8859-1</encoding>--> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<version>2.4</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>2.1.2</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>2.6</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-install-plugin</artifactId> | ||
<version>2.3.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>2.6</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>appassembler-maven-plugin</artifactId> | ||
<version>1.5</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>appassembler-maven-plugin</artifactId> | ||
<executions> | ||
|
||
<execution> | ||
<id>spring-integ-reader</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>generate-daemons</goal> | ||
</goals> | ||
<configuration> | ||
<target>${project.build.directory}/appassembler-jsw</target> | ||
|
||
<repositoryLayout>flat</repositoryLayout> | ||
|
||
<daemons> | ||
<daemon> | ||
<id>${project.name}</id> | ||
<mainClass>fr.jetoile.sample.Main</mainClass> | ||
<commandLineArguments> | ||
</commandLineArguments> | ||
<platforms> | ||
<platform>jsw</platform> | ||
</platforms> | ||
<generatorConfigurations> | ||
<generatorConfiguration> | ||
<generator>jsw</generator> | ||
<includes> | ||
<include>linux-x86-64</include> | ||
</includes> | ||
<configuration> | ||
|
||
<property> | ||
<name>configuration.directory.in.classpath.first</name> | ||
<value>conf</value> | ||
</property> | ||
|
||
<property> | ||
<name>wrapper.logfile.maxsize</name> | ||
<value>100m</value> | ||
</property> | ||
|
||
</configuration> | ||
</generatorConfiguration> | ||
</generatorConfigurations> | ||
<jvmSettings> | ||
<initialMemorySize>256M</initialMemorySize> | ||
<maxMemorySize>2048M</maxMemorySize> | ||
<systemProperties> | ||
<systemProperty>com.sun.management.jmxremote</systemProperty> | ||
<systemProperty>com.sun.management.jmxremote.port=8199</systemProperty> | ||
<systemProperty>com.sun.management.jmxremote.authenticate=false | ||
</systemProperty> | ||
<systemProperty>com.sun.management.jmxremote.ssl=false</systemProperty> | ||
<systemProperty>com.sun.management.jmxremote.local.only=false | ||
</systemProperty> | ||
</systemProperties> | ||
<extraArguments> | ||
<extraArgument>-Xdebug</extraArgument> | ||
<extraArgument> | ||
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n | ||
</extraArgument> | ||
<extraArgument>-server</extraArgument> | ||
<!--<extraArgument>-XX:+UnlockCommercialFeatures</extraArgument>--> | ||
<!--<extraArgument>-XX:+FlightRecorder</extraArgument>--> | ||
<extraArgument>-XX:+HeapDumpOnOutOfMemoryError</extraArgument> | ||
</extraArguments> | ||
</jvmSettings> | ||
</daemon> | ||
</daemons> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
|
||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<!-- Packaging --> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<configuration> | ||
<descriptors> | ||
<descriptor>src/main/assembly/descriptor.xml</descriptor> | ||
</descriptors> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
|
||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>assembly</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0"?> | ||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> | ||
|
||
<id>reader</id> | ||
|
||
<includeBaseDirectory>false</includeBaseDirectory> | ||
|
||
<formats> | ||
<format>tar.gz</format> | ||
</formats> | ||
|
||
|
||
<fileSets> | ||
<fileSet> | ||
<directory>${project.build.directory}/appassembler-jsw/jsw/${project.name}</directory> | ||
<outputDirectory>/</outputDirectory> | ||
<excludes> | ||
<exclude>bin/${project.name}</exclude> | ||
<exclude>bin/wrapper-linux-x86-32</exclude> | ||
<exclude>bin/wrapper-linux-x86-64</exclude> | ||
</excludes> | ||
<fileMode>640</fileMode> | ||
<directoryMode>750</directoryMode> | ||
</fileSet> | ||
|
||
<fileSet> | ||
<directory>src/main/assembly</directory> | ||
<outputDirectory>/logs</outputDirectory> | ||
<excludes> | ||
<exclude>*</exclude> | ||
</excludes> | ||
</fileSet> | ||
</fileSets> | ||
|
||
<files> | ||
<file> | ||
<source>${project.build.directory}/appassembler-jsw/jsw/${project.name}/bin/${project.name}</source> | ||
<outputDirectory>bin</outputDirectory> | ||
<fileMode>750</fileMode> | ||
</file> | ||
<file> | ||
<source>${project.build.directory}/appassembler-jsw/jsw/${project.name}/bin/wrapper-linux-x86-64 | ||
</source> | ||
<outputDirectory>bin</outputDirectory> | ||
<fileMode>750</fileMode> | ||
</file> | ||
</files> | ||
|
||
</assembly> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package fr.jetoile.sample; | ||
|
||
import org.apache.commons.configuration.ConfigurationException; | ||
|
||
public class BootstrapException extends Exception { | ||
public BootstrapException(String s, ConfigurationException e) { | ||
super(s, e); | ||
} | ||
|
||
public BootstrapException(String s) { | ||
super(s); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright (c) 2011 Khanh Tuong Maudoux <kmx.petals@gmail.com> | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. The name of the author may not be used to endorse or promote products | ||
* derived from this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
package fr.jetoile.sample; | ||
|
||
|
||
import org.apache.commons.configuration.Configuration; | ||
import org.apache.commons.configuration.ConfigurationException; | ||
import org.apache.commons.configuration.PropertiesConfiguration; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
|
||
public class Main { | ||
|
||
private final static Logger LOGGER = LoggerFactory.getLogger(Main.class); | ||
|
||
public static final String CONF_PROPERTIES = "default.properties"; | ||
|
||
private static Configuration config; | ||
|
||
public static void main(String[] args) throws BootstrapException { | ||
|
||
try { | ||
config = new PropertiesConfiguration(Main.CONF_PROPERTIES); | ||
|
||
} catch (ConfigurationException e) { | ||
throw new BootstrapException("bad config", e); | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
|
Oops, something went wrong.