Giter VIP home page Giter VIP logo

tibcosoftware / snappy-store Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vmware-archive/gemfirexd-oss

39.0 31.0 18.0 131 MB

SnappyStore

License: Apache License 2.0

Perl 0.15% XSLT 0.05% Batchfile 0.02% Shell 0.42% Java 89.20% HTML 6.53% Makefile 0.01% C 0.23% C++ 1.18% C# 1.01% CSS 0.04% JavaScript 0.02% Thrift 0.04% Python 0.21% SQLPL 0.10% AGS Script 0.09% SourcePawn 0.03% Gnuplot 0.01% Assembly 0.01% PHP 0.68%

snappy-store's Introduction

This repository is provided for legacy users and informational purposes only. It may contain security vulnerabilities in the code itself or its dependencies. TIBCO provides no updates, including security updates, to this code. Consistent with the terms of the Apache License 2.0 that apply to the TIBCO code in this repository, the code is provided on an "as is" basis, without any warranties or conditions of any kind and in no event and under no legal theory shall TIBCO be liable to you for damages arising as a result of the use or inability to use the code.

Overview

SnappyStore is a row oriented, transactional, main-memory distributed data store that is designed for applications that have demanding scalability and availability requirements. You can use the store as a standalone high performance database or as a cache with automatic asynchronous write back to RDBs or as a operational store in "big data" analytic applications. You can manage data entirely using in-memory tables, or you can persist very large tables to local disk store files or to a Hadoop Distributed File System (HDFS) for big data deployments. It provides a low-latency SQL interface to in-memory table data, while seamlessly integrating data that is persisted in HDFS. A single SnappyStore distributed system can be easily scaled out using commodity hardware to support thousands of concurrent clients, and you can also replicate data between multiple clusters over a WAN interface.

History

SnappyStore is a fork of GemFire XD. And, GemFire XD grew out of GemFire, an in-memory data grid developed over a decade. It adds a SQL processing layer on top of GemFire along with several other extensions to integrate with HDFS for working with extremely large volumes of data. GemFire is deployed in hundreds of enterprises worldwide. GemFire transitioned from a commercial product developed at Pivotal (and VMWare and GemStone before that) to a Open source project(geode) to support a growing community of developers.

Getting started

See the instructions below to build the product from source. Once built, you can follow the instructions here to get started with SnappyStore.

Repository layout

The snappy/master branch now mostly mimics the layout of Apache Geode layout for GemFire components and a more structured one for GemFireXD components. It uses gradle based build that can build entire GemFire+GemFireXD+hydra sources and run unit tests (running hydra tests still needs to be added).

Some details on the directories in GemFire layout are mentioned below:

gemfire-shared/src/main/java ===> Code shared between GemFire and GemFireXD client.

gemfire-util/src/main/java ===> Utility classes including copy of JOpt Simple and org.json adapted for GemFire.

gemfire-core/src/main/java ===> Core GemFire code.

gemfire-examples/src/main/java ===> GemFire Tutorial, Quickstart and helloworld.

gemfire-examples/src/(dist,osgi)/java ===> Other GemFire examples.

gemfire-core/src/main/java/templates ===> Example implementations for Authentication etc.

tests/core/src/main/java/com ===> The JUnit and DUnit test suite for GemFire.

tests/core/src/main/java ===> Hydra test framework and full GemFire hydra test suite.

tests/core/src/(version1,version2) ===> Hydra tests for GemFire product versioning.

The GemFireXD layout is divided into separate logical modules namely:

  1. shared

  2. client

  3. prebuild

  4. core

  5. tools

  6. examples

gemfirexd/shared/src/main/java ===> Code shared between GemFireXD client and server/tools.

gemfirexd/client/src/main/java ===> GemFireXD JDBC client.

gemfirexd/client/src/main/gfxdcpp,gfxdodbc ===> gemfirexd/client/src/main/java,gfxdcpp,gfxdodbc

gemfirexd/csharp ===> gemfirexd/client/csharp

gemfirexd/java/tools,gemfirexd/tools ===> various dirs under gemfirexd/tools

gemfirexd/build ===> gemfirexd/prebuild

gemfirexd/java/engine and other core code ===> gemfirexd/core/src/main/java and other directories under gemfirexd/core

tests/sql, gfxdperf and other GFXD test code ===> testing/sql/src/main/java

demo and other such code ===> gemfirexd/examples

Build targets

GemFireXD now builds completely using gradle. Due to the repository layout changes, the older ant builds no longer work (unless someone takes the effort to change them). The new scripts are much simpler, cleaner and way faster than old ant scripts but are still missing a bunch of old targets. Plan is to add them progressively as required.

  • Switch to "snappy/master" branch if not on that already. Update the branch to the latest version. Then test the build with: ./gradlew cleanAll && ./gradlew buildAll
  • Run a GemFireXD junit test: ./gradlew :snappy-store:snappydata-store-tools:junit -Djunit.single='**/BugsTest.class'
  • Run a GemFireXD dunit test: ./gradlew :snappy-store:snappydata-store-tools:dunitTest -Ddunit.single='**/BugsDUnit.class'
  • Run a GemFireXD wan test: ./gradlew :snappy-store:snappydata-store-tools:wan -Dwan.single='**/GfxdSerialWanDUnit.class'

Useful build and test targets:

./gradlew assemble           -  build all the sources
./gradlew testClasses        -  build all the tests
./gradlew product            -  build and place the product distribution
                                (in build-artifacts/{osname like linux}/store)
./gradlew buildAll           -  build all sources, tests, product, packages (all targets above)
./gradlew cleanAll           -  clean all build and test output
./gradlew junit              -  run junit tests for all components
./gradlew dunit              -  run distributed unit (dunit) tests for all relevant components
./gradlew wan                -  run distributed WAN tests for all relevant components
./gradlew check              -  run all tests including junit, dunit and wan
./gradlew precheckin -Pgfxd  -  cleanAll, buildAll, check

Command-line properties:

-Djunit.single=<test>        - run a single junit test; the test is provided as path
                               to its .class file (wildcards like '*' and '**' can be
                               used like in gradle includes/excludes patterns)
-Ddunit.single=<test>          - run a single dunit test
-Dwan.single=<test>            - run a single wan dunit test
-DlogLevel=<level>             - set the log-level for the tests (default is "config")
-DsecurityLogLevel=<level>     - set the security-log-level for the tests (default is "config")
-Dskip.wanTest=true|false      - if true, then skip the wan tests when running check/precheckin

Setting up Intellij with gradle

If the build works fine, then import into Intellij:

  • Update Intellij to the latest version just to be sure. Double check that Gradle plugin is enabled in File->Settings->Plugins.
  • Select import project, then point to the GemFireXD directory. Use external Gradle import. Select defaults, next, next ... finish. Ignore "Gradle location is unknown warning". Ensure that a JDK7 installation has been selected.
  • Once import finishes, go to File->Settings->Editor->Code Style->Java. Set the scheme as "Project". Then OK to apply and close it. Next copy codeStyleSettings.xml to .idea directory created by Intellij and then File->Synchronize just to be sure. Check that settings are now applied in File->Settings->Editor->Code Style->Java which should show TabSize, Indent as 2 and continuation indent as 4.
  • If the Gradle tab is not visible immediately, then select it from window list popup at the left-bottom corner of IDE. If you click on that window list icon, then the tabs will appear permanently.
  • Generate GemFireXD required sources by expanding :gemfirexd->Tasks->other. Right click on "generateSources" and run it. The Run item may not be available if indexing is still in progress, so wait for it to finish. This step has to be done only first time, or if ./gradlew clean has been run, or you have made changes to javacc source files.
  • Increase the compiler heap sizes else build can take quite long. In File->Settings->Build, Execution, Deployment->Compiler increase "Build process heap size" to say 1536 or 2048.
  • Test the full build.
  • Open Run->Edit Configurations. Expand Defaults, and select JUnit. Append "/build-artifacts" to the working directory i.e. the directory should be "$MODULE_DIR$/build-artifacts".
  • Try Run->Run... on a test like CreateSchemaTest. Select the normal junit configuration (red+green arrows icon) and not gradle configuration (green round icon).

Running a unit test

  • When selecting a run configuration for junit, avoid selecting the gradle one (green round icon) otherwise that will launch an external gradle process that will start building the project all over again. Use the normal junit (red+green arrows icon).
  • For JUnit tests, ensure that working directory is "$MODULE_DIR$/build-artifacts" as mentioned before. Otherwise many GemFireXD tests will fail to find the resource files required in many tests. They will also pollute the checkouts with large number of log files etc, so this will allow those to go into build-artifacts that can also be cleaned up easily.

A dunit test can also be executed like above with the difference that multiple JVMs (ChildVM) will get launched in the test run. If you wish to debug the other JVMs, then need to find the appropriate process and attach the IDE debugger to the external JVM process.

snappy-store's People

Contributors

ahshahid avatar ashetkar avatar bisenpiyush avatar crabo avatar dhavalstr avatar dshirish avatar gmlewis avatar hbhanawat avatar hemanthmeka avatar jramnara avatar lizygeogy avatar nthanvi avatar paresh-p11 avatar pradeepsurale avatar rishitesh avatar sachinjanani avatar schiwate avatar smahajan05 avatar snappy-sachin avatar sonalsagarwal avatar sumwale avatar svbhokare avatar swatisawant avatar vatsalmevada avatar vibhaska avatar vjr avatar ymahajan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snappy-store's Issues

Update Queries On Row Table Taking Long

In my test I have been trying to update 10 mil rows in a ROW oriented replicated table with snappy version 0.3. The update queries are taking about 90 mins to update 10 million rows. The create table query and the update queries are as below

`create table product1
(name VARCHAR(100), volume INT, price INT, discount int, baseline INT
,uplift int, final_price int, sale_price int, PRIMARY KEY (name)) ;

update product set PRICE = 100
update product set DISCOUNT = 10
update product set UPLIFT = 5
update product set BASELINE = (PRICE - PRICE * DISCOUNT/100)
update product set FINAL_PRICE = (BASELINE + BASELINE * UPLIFT/100)
update product set SALE_PRICE = (VOLUME * FINAL_PRICE)`

Leader & Locator Logs
Server 1 Logs
Server 2 Logs
Server 3 Logs

Given the timings to execute these simple queries are quite long, I wanted to check if I am missing anything. Let me know if you need more details. Thanks !

Connecting to snappy store through JDBC

I tried connecting to the currently deployed snappy store using the gemfirexd client jar from maven repo with the jdbc url as
jdbc:gemfirexd://hostname:port/. The connection fails with an error "Connection refused".

What are the right steps to write a jdbc client for snappy?

Snappy Server Hangs On Startup

With snappy 0.2.1, I am facing an issue where the snappy server(s) fails to start. The logs on the locator indicate that proxy creation was the last step executed on that node. Some of the logs are share here.
The thread dump for all the nodes is shared here .

Thanks!

"Table Not Found Error" while executing an update query

I am using snappy 0.3 and trying to execute an update query on a table through a jdbc client. The query fails with a "Table not found error" while the same query executes correctly on the snappy-shell. Here's the jdbc client code for reference. The error trace is pasted here.

Note that a select * from table query succeeds in the jdbc client code. Wonder what could I be missing?

Errors in calling a DAP within a DAP

With snappy 0.2.1 I am trying to call a data aware procedure (DAP) inside a DAP. There are couple of issues with the nested call

  1. Using the snappy-shell client I call the DAP which executes the DAP (verified through logs) but the nested DAP call executes multiple times instead of once.
  2. The nested call later fails with a NPE. The error trace is shared here.

The DAP code is shared here.

I would appreciate for any inputs on this. Thanks!

Thrift endpoint in the next release?

From discussions with SnappyData, I learned there are plans for exposing the thrift endpoint. There is a WIP c++ client in the repository. What is the status / timeline of this?

createLocator did not throw an exception

With snappy0.9, we did not start locator successfully, and get these message:
Starting Thrift server for SnappyData at address snappydata-locator-0/10.244.7.213[1527] java.lang.Exception: No available status. Either status file ".snappylocator.ser" is not readable or reading the status file timed out. at com.gemstone.gemfire.internal.cache.CacheServerLauncher.waitForRunning(CacheServerLauncher.java:1489) at com.gemstone.gemfire.internal.cache.CacheServerLauncher.start(CacheServerLauncher.java:659) at com.pivotal.gemfirexd.tools.internal.GfxdServerLauncher.run(GfxdServerLauncher.java:796) at io.snappydata.tools.LocatorLauncher.run(GfxdLauncherOverrides.scala:73) at io.snappydata.tools.LocatorLauncher$.main(GfxdLauncherOverrides.scala:90) at io.snappydata.tools.LocatorLauncher.main(GfxdLauncherOverrides.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.gemstone.gemfire.internal.GemFireUtilLauncher.invoke(GemFireUtilLauncher.java:176) at com.pivotal.gemfirexd.tools.GfxdUtilLauncher.invoke(GfxdUtilLauncher.java:257) at io.snappydata.tools.SnappyUtilLauncher.invoke(SnappyUtilLauncher.scala:91) at io.snappydata.tools.SnappyUtilLauncher$.main(SnappyUtilLauncher.scala:137) at io.snappydata.tools.SnappyUtilLauncher.main(SnappyUtilLauncher.scala)

The reason is the method "createLocator" in InternalLocator.java failed, then .snappylocator.ser is not generated, "waitForRunning" in CacheServerLauncher.java report the ".snappylocator.ser" is not readable.
But we did not known why does "createLocator" fail? The method "createLocator" did not throw exception. Does anyone help adding "throw Exeption" for method "createLocator"?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.