This repository was archived by the owner on Jan 14, 2025. It is now read-only.
forked from uber/marmaray
-
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.
Add .gitignore and code which was missed in first commit
- Loading branch information
1 parent
f4988e7
commit 6d0cc68
Showing
260 changed files
with
26,644 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,90 @@ | ||
# Compiled source # | ||
################### | ||
*.com | ||
*.class | ||
*.dll | ||
*.exe | ||
*.a | ||
*.o | ||
*.so | ||
*.node | ||
|
||
# Node Waf Byproducts # | ||
####################### | ||
.lock-wscript | ||
build/ | ||
autom4te.cache/ | ||
|
||
# Node Modules # | ||
################ | ||
# Better to let npm install these from the package.json defintion | ||
# rather than maintain this manually | ||
node_modules/ | ||
|
||
# Packages # | ||
############ | ||
# it's better to unpack these files and commit the raw source | ||
# git has its own built in compression methods | ||
*.7z | ||
*.dmg | ||
*.gz | ||
*.iso | ||
*.jar | ||
*.rar | ||
*.tar | ||
*.zip | ||
|
||
# Logs and databases # | ||
###################### | ||
*.log | ||
dump.rdb | ||
*.tap | ||
|
||
|
||
# OS generated files # | ||
###################### | ||
.DS_Store? | ||
.DS_Store | ||
ehthumbs.db | ||
Icon? | ||
Thumbs.db | ||
|
||
# thrift generated files # | ||
########################## | ||
generated/ | ||
|
||
# NodeJS Core Dump | ||
core | ||
|
||
# Jenkins build scripts | ||
rt-jenkins/ | ||
|
||
# Coverage Reports | ||
coverage/ | ||
|
||
# local docs, scratchboards | ||
localdocs/ | ||
|
||
# vi temp files | ||
.*.swp | ||
|
||
# intelliJ | ||
.idea/ | ||
*.iml | ||
|
||
# Project specific items (local conf, build dir) | ||
config/local.json | ||
maps-evidence/ | ||
*.lst | ||
classes/ | ||
target/ | ||
*.dat | ||
|
||
# shaded jar pom file | ||
dependency-reduced-pom.xml | ||
|
||
# output of build plugin org.codehaus.mojo build-helper-maven-plugin | ||
test_properties.props | ||
|
||
# gradle generated logs | ||
.gradle |
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,136 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE module PUBLIC | ||
"-//Puppy Crawl//DTD Check Configuration 1.2//EN" | ||
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> | ||
|
||
<!-- | ||
Checkstyle-Configuration: Uber | ||
Description: Checkstyle configuration for Uber. | ||
--> | ||
<module name="Checker"> | ||
<property name="charset" value="UTF-8"/> | ||
|
||
<module name="SuppressionFilter"> | ||
<property name="file" value="${checkstyle.suppression.file}" /> | ||
</module> | ||
|
||
<module name="SuppressionCommentFilter"/> | ||
|
||
<!-- Trailing spaces --> | ||
<module name="RegexpSingleline"> | ||
<property name="format" value="\s+$"/> | ||
<property name="message" value="Line has trailing spaces."/> | ||
</module> | ||
|
||
<!-- Double blank lines --> | ||
<module name="RegexpMultiline"> | ||
<property name="format" value="\n\n\n"/> | ||
<property name="message" value="Double blank lines."/> | ||
</module> | ||
|
||
<!-- New line EOF --> | ||
<module name="NewlineAtEndOfFile"/> | ||
<module name="FileLength"/> | ||
<module name="FileTabCharacter"> | ||
<property name="eachLine" value="true"/> | ||
</module> | ||
|
||
<module name="TreeWalker"> | ||
|
||
<module name="FileContentsHolder"/> | ||
|
||
<!-- Line length --> | ||
<module name="LineLength"> | ||
<property name="max" value="120"/> | ||
<property name="ignorePattern" value="^(package .*;\s*)|(import .*;\s*)|( *\*.*)$"/> | ||
</module> | ||
|
||
<!-- Indentation --> | ||
<module name="Indentation"/> | ||
<module name="OperatorWrap"/> | ||
|
||
<!-- Curly braces --> | ||
<module name="NeedBraces"/> | ||
<module name="LeftCurly"> | ||
<property name="maxLineLength" value="120"/> | ||
</module> | ||
<module name="RightCurly"/> | ||
|
||
<!-- Order --> | ||
<module name="InnerTypeLast"/> | ||
<module name="DeclarationOrder"/> | ||
<module name="ModifierOrder"/> | ||
<module name="RedundantModifier"/> | ||
|
||
<!-- Empty block --> | ||
<module name="EmptyBlock"> | ||
<property name="tokens" value="LITERAL_WHILE,LITERAL_TRY,LITERAL_FINALLY,LITERAL_DO,LITERAL_IF,LITERAL_ELSE,LITERAL_FOR,INSTANCE_INIT,STATIC_INIT,LITERAL_SWITCH"/> | ||
</module> | ||
|
||
<!-- Fall through --> | ||
<module name="FallThrough"/> | ||
<module name="DefaultComesLast"/> | ||
|
||
<!-- Correct annotation --> | ||
<module name="MissingOverride"/> | ||
<module name="MissingDeprecated"/> | ||
|
||
<!-- Import --> | ||
<module name="AvoidStarImport"/> | ||
<module name="IllegalImport"/> | ||
<module name="RedundantImport"/> | ||
<module name="UnusedImports"> | ||
<property name="processJavadoc" value="true"/> | ||
</module> | ||
|
||
<!-- White space --> | ||
<module name="GenericWhitespace"/> | ||
<module name="WhitespaceAfter"/> | ||
<module name="WhitespaceAround"/> | ||
<module name="NoWhitespaceAfter"> | ||
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/> | ||
</module> | ||
<module name="NoWhitespaceBefore"/> | ||
<module name="EmptyForInitializerPad"/> | ||
<module name="EmptyForIteratorPad"/> | ||
<module name="MethodParamPad"/> | ||
<module name="TypecastParenPad"/> | ||
<module name="ParenPad"/> | ||
|
||
<!-- Class design --> | ||
<module name="PackageAnnotation"/> | ||
<module name="OuterTypeFilename"/> | ||
<module name="PackageDeclaration"/> | ||
<module name="FinalClass"/> | ||
<module name="InterfaceIsType"/> | ||
|
||
<!-- Equality --> | ||
<module name="CovariantEquals"/> | ||
<module name="EqualsHashCode"/> | ||
<module name="StringLiteralEquality"/> | ||
|
||
<!-- Style --> | ||
<module name="TrailingComment"/> | ||
<module name="UpperEll"/> | ||
<module name="ArrayTypeStyle"/> | ||
<module name="MultipleVariableDeclarations"/> | ||
<module name="OneStatementPerLine"/> | ||
<module name="SimplifyBooleanExpression"/> | ||
<module name="SimplifyBooleanReturn"/> | ||
|
||
<!-- Clone --> | ||
<module name="NoClone"/> | ||
<module name="NoFinalizer"/> | ||
<module name="SuperClone"/> | ||
|
||
<!-- Block and Statement --> | ||
<module name="NestedTryDepth"/> | ||
<module name="AvoidNestedBlocks"/> | ||
<module name="EmptyStatement"/> | ||
<module name="IllegalInstantiation"/> | ||
<module name="InnerAssignment"/> | ||
|
||
<!-- Final parameters --> | ||
<module name="FinalParameters"/> | ||
</module> | ||
</module> |
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 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!DOCTYPE suppressions PUBLIC | ||
"-//Puppy Crawl//DTD Suppressions 1.1//EN" | ||
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> | ||
|
||
<suppressions> | ||
<suppress files=".*gen-java.*" checks="[a-zA-Z0-9]*"/> | ||
<suppress files=".*generated.*" checks="[a-zA-Z0-9]*"/> | ||
<suppress files=".*products.*" checks="[a-zA-Z0-9]*"/> | ||
<suppress files=".*test.*" checks="[a-zA-Z0-9]*"/> | ||
</suppressions> | ||
|
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,22 @@ | ||
<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> | ||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
<parent> | ||
<groupId>com.uber.marmaray</groupId> | ||
<artifactId>marmaray-base</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>marmaray-tools</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.uber.marmaray</groupId> | ||
<artifactId>marmaray</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
</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,62 @@ | ||
""" | ||
Copyright (c) 2018 Uber Technologies, Inc. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | ||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all copies or substantial portions | ||
of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO | ||
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
IN THE SOFTWARE. | ||
""" | ||
|
||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
""" | ||
A script to either enable or disable a HDFS metadata file. A metadata file is disabled if the extension ".tmp" | ||
is appended at the end. Enabling a metadata file will remove the same extension. This tool will allow users | ||
to disable metadata files and associated watermarks inside these files used to determine which partition to process. | ||
Usage: toggleHDFSMetadataFile -f sample_file -d | ||
toggleHDFSMetadataFile -f sample_file.tmp -e | ||
""" | ||
import argparse, sys | ||
import shutil | ||
import logging | ||
from os.path import basename, dirname, splitext, isfile | ||
|
||
def main(args): | ||
logging.basicConfig(level=logging.INFO) | ||
disabled_ext = ".tmp" | ||
|
||
if not isfile(args.file): | ||
logging.error("the file does not exist") | ||
quit() | ||
|
||
if args.disable: | ||
if not args.file.endswith(disabled_ext): | ||
logging.info("Disabling %s", args.file) | ||
shutil.move(args.file, args.file + disabled_ext) | ||
else: | ||
logging.warning("the specified filename already ends with a .tmp extension") | ||
if args.enable: | ||
if args.file.endswith(disabled_ext): | ||
logging.info("Enabling %s ", args.file) | ||
shutil.move(args.file, dirname(args.file) + splitext(basename(args.file))[0]) | ||
else: | ||
logging.error("the file must end with a .tmp extension") | ||
|
||
if __name__ == '__main__': | ||
p= argparse.ArgumentParser() | ||
p.add_argument('-f', '--file', help='File to toggle on/off as metadata file') | ||
p.add_argument('-e', '--enable', help='Enable .tmp file as metadata file', action='store_true') | ||
p.add_argument('-d', '--disable', help='disable metadata file', action='store_true') | ||
args = p.parse_args() | ||
main(args) |
Oops, something went wrong.