forked from yugabyte/yb-sample-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Populating with the initial cut of the sample app code from the main …
…YugaByte DB repo
- Loading branch information
1 parent
b613597
commit ab18f55
Showing
49 changed files
with
7,922 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,152 @@ | ||
<?xml version="1.0"?> | ||
<!-- Copyright (c) YugaByte, Inc. --> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.yugabyte</groupId> | ||
<artifactId>yb-sample-apps</artifactId> | ||
<version>1.0</version> | ||
<name>YB Sample Apps</name> | ||
<packaging>jar</packaging> | ||
|
||
<!-- Properties Management --> | ||
<properties> | ||
<maven-dependency-plugin.phase>prepare-package</maven-dependency-plugin.phase> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.yugabyte</groupId> | ||
<artifactId>cassandra-driver-core</artifactId> | ||
<version>3.2.0-yb-12</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>log4j</groupId> | ||
<artifactId>log4j</artifactId> | ||
<version>1.2.17</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-log4j12</artifactId> | ||
<version>1.7.12</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>1.7.12</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-cli</groupId> | ||
<artifactId>commons-cli</artifactId> | ||
<version>1.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-codec</groupId> | ||
<artifactId>commons-codec</artifactId> | ||
<version>1.10</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.yugabyte</groupId> | ||
<artifactId>jedis</artifactId> | ||
<version>2.9.0-yb-16</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-math3</artifactId> | ||
<version>3.5</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.code.gson</groupId> | ||
<artifactId>gson</artifactId> | ||
<version>2.8.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.postgresql</groupId> | ||
<artifactId>postgresql</artifactId> | ||
<version>42.2.2</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
|
||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-enforcer-plugin</artifactId> | ||
<version>3.0.0-M1</version> | ||
<configuration> | ||
<rules> | ||
<requireMavenVersion> | ||
<version>[3.0.2,)</version> | ||
</requireMavenVersion> | ||
<requireJavaVersion> | ||
<version>[1.8,)</version> | ||
</requireJavaVersion> | ||
</rules> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.7.0</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-dependencies</id> | ||
<phase>${maven-dependency-plugin.phase}</phase> | ||
<goals> | ||
<goal>copy-dependencies</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/lib</outputDirectory> | ||
<overWriteReleases>true</overWriteReleases> | ||
<overWriteSnapshots>true</overWriteSnapshots> | ||
<overWriteIfNewer>true</overWriteIfNewer> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<!-- make the jar executable by adding a Main-Class and Class-Path to the manifest --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<configuration> | ||
<finalName>yb-sample-apps</finalName> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<archive> | ||
<manifest> | ||
<mainClass>com.yugabyte.sample.Main</mainClass> | ||
</manifest> | ||
</archive> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>make-assembly</id> <!-- this is used for inheritance merges --> | ||
<phase>package</phase> <!-- bind to the packaging 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,40 @@ | ||
# Autosave files | ||
*~ | ||
|
||
# build | ||
[Oo]bj/ | ||
[Bb]in/ | ||
packages/ | ||
TestResults/ | ||
|
||
# globs | ||
Makefile.in | ||
*.DS_Store | ||
*.sln.cache | ||
*.suo | ||
*.cache | ||
*.pidb | ||
*.userprefs | ||
*.usertasks | ||
config.log | ||
config.make | ||
config.status | ||
aclocal.m4 | ||
install-sh | ||
autom4te.cache/ | ||
*.user | ||
*.tar.gz | ||
tarballs/ | ||
test-results/ | ||
Thumbs.db | ||
|
||
# Mac bundle stuff | ||
*.dmg | ||
*.app | ||
|
||
# resharper | ||
*_Resharper.* | ||
*.Resharper | ||
|
||
# dotCover | ||
*.dotCover |
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,87 @@ | ||
# | ||
# Copyright (c) YugaByte, Inc. | ||
# | ||
# Licensed 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 distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
<ProjectGuid>{977BE115-CEDD-43D9-AC92-688A9D1E813B}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<RootNamespace>HelloWorld</RootNamespace> | ||
<AssemblyName>HelloWorld</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug</OutputPath> | ||
<DefineConstants>DEBUG;</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ExternalConsole>true</ExternalConsole> | ||
<PlatformTarget>x86</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ExternalConsole>true</ExternalConsole> | ||
<PlatformTarget>x86</PlatformTarget> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="Mono.Options"> | ||
<HintPath>packages\Mono.Options.4.4.0.0\lib\net4-client\Mono.Options.dll</HintPath> | ||
</Reference> | ||
<Reference Include="LZ4"> | ||
<HintPath>packages\lz4net.1.0.10.93\lib\net4-client\LZ4.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions"> | ||
<HintPath>packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.0.0\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Extensions.Logging.Abstractions"> | ||
<HintPath>packages\Microsoft.Extensions.Logging.Abstractions.1.0.0\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Extensions.Logging"> | ||
<HintPath>packages\Microsoft.Extensions.Logging.1.0.0\lib\netstandard1.1\Microsoft.Extensions.Logging.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Cassandra"> | ||
<HintPath>packages\CassandraCSharpDriver.3.2.1\lib\net45\Cassandra.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Numerics" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
<ProjectExtensions> | ||
<MonoDevelop> | ||
<Properties> | ||
<Policies> | ||
<TextStylePolicy TabsToSpaces="True" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" FileWidth="120" TabWidth="2" IndentWidth="2" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-csharp" /> | ||
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="False" NewLinesForBracesInAccessors="False" NewLinesForBracesInAnonymousMethods="False" NewLinesForBracesInControlBlocks="False" NewLinesForBracesInAnonymousTypes="False" NewLinesForBracesInObjectCollectionArrayInitializers="False" NewLinesForBracesInLambdaExpressionBody="False" NewLineForElse="False" NewLineForCatch="False" NewLineForFinally="False" NewLineForMembersInObjectInit="False" NewLineForMembersInAnonymousTypes="False" NewLineForClausesInQuery="False" SpacingAfterMethodDeclarationName="True" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="True" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceAfterControlFlowStatementKeyword="True" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="True" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" IndentSwitchSection="True" inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" /> | ||
</Policies> | ||
</Properties> | ||
</MonoDevelop> | ||
</ProjectExtensions> | ||
</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,60 @@ | ||
# | ||
# Copyright (c) YugaByte, Inc. | ||
# | ||
# Licensed 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 distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorld", "HelloWorld.csproj", "{977BE115-CEDD-43D9-AC92-688A9D1E813B}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|x86 = Debug|x86 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{977BE115-CEDD-43D9-AC92-688A9D1E813B}.Debug|x86.ActiveCfg = Debug|x86 | ||
{977BE115-CEDD-43D9-AC92-688A9D1E813B}.Debug|x86.Build.0 = Debug|x86 | ||
{977BE115-CEDD-43D9-AC92-688A9D1E813B}.Release|x86.ActiveCfg = Release|x86 | ||
{977BE115-CEDD-43D9-AC92-688A9D1E813B}.Release|x86.Build.0 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(MonoDevelopProperties) = preSolution | ||
Policies = $0 | ||
$0.TextStylePolicy = $1 | ||
$1.FileWidth = 120 | ||
$1.TabWidth = 2 | ||
$1.IndentWidth = 2 | ||
$1.inheritsSet = VisualStudio | ||
$1.inheritsScope = text/plain | ||
$1.scope = text/x-csharp | ||
$0.CSharpFormattingPolicy = $2 | ||
$2.IndentSwitchSection = True | ||
$2.NewLinesForBracesInProperties = True | ||
$2.NewLinesForBracesInAccessors = True | ||
$2.NewLinesForBracesInAnonymousMethods = True | ||
$2.NewLinesForBracesInControlBlocks = True | ||
$2.NewLinesForBracesInAnonymousTypes = True | ||
$2.NewLinesForBracesInObjectCollectionArrayInitializers = True | ||
$2.NewLinesForBracesInLambdaExpressionBody = True | ||
$2.NewLineForElse = True | ||
$2.NewLineForCatch = True | ||
$2.NewLineForFinally = True | ||
$2.NewLineForMembersInObjectInit = True | ||
$2.NewLineForMembersInAnonymousTypes = True | ||
$2.NewLineForClausesInQuery = True | ||
$2.SpacingAfterMethodDeclarationName = False | ||
$2.SpaceAfterMethodCallName = False | ||
$2.SpaceBeforeOpenSquareBracket = False | ||
$2.inheritsSet = Mono | ||
$2.inheritsScope = text/x-csharp | ||
$2.scope = text/x-csharp | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.