Permalink
Browse files

Initial commit of the Schema Repo, based on the AVRO-1124 patch.

  • Loading branch information...
FelixGV committed Oct 22, 2014
0 parents commit b170692a24500e5f910bb41b872f557ec245713f
Showing with 4,872 additions and 0 deletions.
  1. +6 −0 README.txt
  2. +3 −0 bundle/config/config.properties
  3. +91 −0 bundle/pom.xml
  4. +59 −0 checkstyle.xml
  5. +74 −0 client/pom.xml
  6. +228 −0 client/src/main/java/org/schemarepo/client/RESTRepositoryClient.java
  7. +55 −0 client/src/test/java/org/schemarepo/client/RESTRepositoryClientTest.java
  8. +68 −0 common/pom.xml
  9. +85 −0 common/src/main/java/org/schemarepo/CacheRepository.java
  10. +80 −0 common/src/main/java/org/schemarepo/DelegatingSubject.java
  11. +554 −0 common/src/main/java/org/schemarepo/FileRepository.java
  12. +30 −0 common/src/main/java/org/schemarepo/InMemoryCache.java
  13. +122 −0 common/src/main/java/org/schemarepo/InMemoryRepository.java
  14. +73 −0 common/src/main/java/org/schemarepo/InMemorySchemaEntryCache.java
  15. +52 −0 common/src/main/java/org/schemarepo/InMemorySubjectCache.java
  16. +66 −0 common/src/main/java/org/schemarepo/ReadOnlyRepository.java
  17. +62 −0 common/src/main/java/org/schemarepo/Repository.java
  18. +52 −0 common/src/main/java/org/schemarepo/RepositoryCache.java
  19. +147 −0 common/src/main/java/org/schemarepo/RepositoryUtil.java
  20. +95 −0 common/src/main/java/org/schemarepo/SchemaEntry.java
  21. +83 −0 common/src/main/java/org/schemarepo/SchemaEntryCache.java
  22. +27 −0 common/src/main/java/org/schemarepo/SchemaValidationException.java
  23. +361 −0 common/src/main/java/org/schemarepo/Subject.java
  24. +53 −0 common/src/main/java/org/schemarepo/SubjectCache.java
  25. +169 −0 common/src/main/java/org/schemarepo/SubjectConfig.java
  26. +59 −0 common/src/main/java/org/schemarepo/Validator.java
  27. +89 −0 common/src/main/java/org/schemarepo/ValidatorFactory.java
  28. +255 −0 common/src/test/java/org/schemarepo/AbstractTestRepository.java
  29. +28 −0 common/src/test/java/org/schemarepo/TestCacheRepository.java
  30. +190 −0 common/src/test/java/org/schemarepo/TestFileRepository.java
  31. +28 −0 common/src/test/java/org/schemarepo/TestInMemoryRepository.java
  32. +114 −0 common/src/test/java/org/schemarepo/TestReadOnlyRepository.java
  33. +97 −0 common/src/test/java/org/schemarepo/TestRepositoryUtil.java
  34. +84 −0 common/src/test/java/org/schemarepo/TestSchemaEntry.java
  35. +85 −0 common/src/test/java/org/schemarepo/TestSubjectConfig.java
  36. +92 −0 common/src/test/java/org/schemarepo/TestValidatingSubject.java
  37. +53 −0 common/src/test/java/org/schemarepo/TestValidatorFactory.java
  38. +209 −0 pom.xml
  39. +11 −0 run.sh
  40. +74 −0 server/pom.xml
  41. +100 −0 server/src/main/java/org/schemarepo/server/ConfigModule.java
  42. +300 −0 server/src/main/java/org/schemarepo/server/RESTRepository.java
  43. +159 −0 server/src/main/java/org/schemarepo/server/RepositoryServer.java
  44. +52 −0 server/src/test/java/org/schemarepo/server/TestConfigModule.java
  45. +57 −0 server/src/test/java/org/schemarepo/server/TestRESTRepository.java
  46. +41 −0 server/src/test/java/org/schemarepo/server/TestRepo.java
@@ -0,0 +1,6 @@
The schema repo is a standalone version of the patch submitted on the Apache AVRO-1124 ticket.
In order to build and run the schema repo, execute the following commands in the current directory:
mvn install
./run.sh
@@ -0,0 +1,3 @@
schema-repo.class=org.schemarepo.InMemoryRepository
#schema-repo.cached=org.schemarepo.CacheRepository
schema-repo.file-repo-path=target/data/
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<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>
<parent>
<artifactId>schema-repo-parent</artifactId>
<groupId>org.schemarepo</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>schema-repo-bundle</artifactId>
<name>Schema Repository Bundle</name>
<url>http://schemarepo.org</url>
<description>Schema Repository standalone bundle</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>bundle</id>
<goals>
<goal>shade</goal>
</goals>
<phase>package</phase>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>withdeps</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.schemarepo.server.RepositoryServer</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/SUN_MICR.*</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
</profiles>
<dependencies>
<dependency>
<groupId>org.schemarepo</groupId>
<artifactId>schema-repo-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.schemarepo</groupId>
<artifactId>schema-repo-client</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,59 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="FileTabCharacter"/>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf"/>
</module>
<module name="TreeWalker">
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<module name="AvoidStarImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="RedundantModifier"/>
<module name="EmptyStatement"/>
<module name="IllegalInstantiation"/>
<module name="RedundantThrows"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="InterfaceIsType"/>
<module name="ArrayTypeStyle"/>
<module name="UpperEll"/>
</module>
</module>
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<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>
<parent>
<artifactId>schema-repo-parent</artifactId>
<groupId>org.schemarepo</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>schema-repo-client</artifactId>
<name>Schema Repository Client</name>
<url>http://schemarepo.org</url>
<description>Schema Repository Client</description>
<build>
</build>
<profiles>
</profiles>
<dependencies>
<dependency>
<groupId>org.schemarepo</groupId>
<artifactId>schema-repo-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.schemarepo</groupId>
<artifactId>schema-repo-common</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.schemarepo</groupId>
<artifactId>schema-repo-server</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Oops, something went wrong.

0 comments on commit b170692

Please sign in to comment.