Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
YCSB
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adnan Ahmad
YCSB
Commits
7fa83311
Commit
7fa83311
authored
8 years ago
by
Kevin Risden
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[dynamodb] Enforce checkstyle for DynamoDB binding (#904)
parent
9cba2071
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dynamodb/pom.xml
+10
-37
10 additions, 37 deletions
dynamodb/pom.xml
dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java
+8
-8
8 additions, 8 deletions
dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java
with
18 additions
and
45 deletions
dynamodb/pom.xml
+
10
−
37
View file @
7fa83311
...
...
@@ -16,7 +16,8 @@ permissions and limitations under the License. See accompanying
LICENSE file.
-->
<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"
>
<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>
<parent>
<groupId>
com.yahoo.ycsb
</groupId>
...
...
@@ -28,50 +29,22 @@ LICENSE file.
<artifactId>
dynamodb-binding
</artifactId>
<name>
DynamoDB DB Binding
</name>
<properties>
<checkstyle.failOnViolation>
false
</checkstyle.failOnViolation>
</properties>
<dependencies>
<dependency>
<groupId>
com.amazonaws
</groupId>
<artifactId>
aws-java-sdk
</artifactId>
<version>
1.10.48
</version>
</dependency>
<dependency>
<groupId>
log4j
</groupId>
<artifactId>
log4j
</artifactId>
<version>
1.2.17
</version>
</dependency>
<dependency>
</dependency>
<dependency>
<groupId>
log4j
</groupId>
<artifactId>
log4j
</artifactId>
<version>
1.2.17
</version>
</dependency>
<dependency>
<groupId>
com.yahoo.ycsb
</groupId>
<artifactId>
core
</artifactId>
<version>
${project.version}
</version>
<scope>
provided
</scope>
<scope>
provided
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-checkstyle-plugin
</artifactId>
<version>
2.15
</version>
<configuration>
<consoleOutput>
true
</consoleOutput>
<configLocation>
../checkstyle.xml
</configLocation>
<failOnViolation>
true
</failOnViolation>
<failsOnError>
true
</failsOnError>
</configuration>
<executions>
<execution>
<id>
validate
</id>
<phase>
validate
</phase>
<goals>
<goal>
checkstyle
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This diff is collapsed.
Click to expand it.
dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java
+
8
−
8
View file @
7fa83311
...
...
@@ -105,7 +105,7 @@ public class DynamoDBClient extends DB {
this
.
primaryKeyType
=
PrimaryKeyType
.
valueOf
(
primaryKeyTypeString
.
trim
().
toUpperCase
());
}
catch
(
IllegalArgumentException
e
)
{
throw
new
DBException
(
"Invalid primary key mode specified: "
+
primaryKeyTypeString
+
". Expecting HASH or HASH_AND_RANGE."
);
". Expecting HASH or HASH_AND_RANGE."
);
}
}
...
...
@@ -138,7 +138,7 @@ public class DynamoDBClient extends DB {
@Override
public
Status
read
(
String
table
,
String
key
,
Set
<
String
>
fields
,
HashMap
<
String
,
ByteIterator
>
result
)
{
if
(
LOGGER
.
isDebugEnabled
())
{
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"readkey: "
+
key
+
" from table: "
+
table
);
}
...
...
@@ -159,7 +159,7 @@ public class DynamoDBClient extends DB {
if
(
null
!=
res
.
getItem
())
{
result
.
putAll
(
extractResult
(
res
.
getItem
()));
if
(
LOGGER
.
isDebugEnabled
())
{
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"Result: "
+
res
.
toString
());
}
}
...
...
@@ -170,7 +170,7 @@ public class DynamoDBClient extends DB {
public
Status
scan
(
String
table
,
String
startkey
,
int
recordcount
,
Set
<
String
>
fields
,
Vector
<
HashMap
<
String
,
ByteIterator
>>
result
)
{
if
(
LOGGER
.
isDebugEnabled
())
{
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"scan "
+
recordcount
+
" records from key: "
+
startkey
+
" on table: "
+
table
);
}
...
...
@@ -229,7 +229,7 @@ public class DynamoDBClient extends DB {
@Override
public
Status
update
(
String
table
,
String
key
,
HashMap
<
String
,
ByteIterator
>
values
)
{
if
(
LOGGER
.
isDebugEnabled
())
{
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"updatekey: "
+
key
+
" from table: "
+
table
);
}
...
...
@@ -255,7 +255,7 @@ public class DynamoDBClient extends DB {
@Override
public
Status
insert
(
String
table
,
String
key
,
HashMap
<
String
,
ByteIterator
>
values
)
{
if
(
LOGGER
.
isDebugEnabled
())
{
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"insertkey: "
+
primaryKeyName
+
"-"
+
key
+
" from table: "
+
table
);
}
...
...
@@ -284,7 +284,7 @@ public class DynamoDBClient extends DB {
@Override
public
Status
delete
(
String
table
,
String
key
)
{
if
(
LOGGER
.
isDebugEnabled
())
{
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"deletekey: "
+
key
+
" from table: "
+
table
);
}
...
...
@@ -318,7 +318,7 @@ public class DynamoDBClient extends DB {
HashMap
<
String
,
ByteIterator
>
rItems
=
new
HashMap
<>(
item
.
size
());
for
(
Entry
<
String
,
AttributeValue
>
attr
:
item
.
entrySet
())
{
if
(
LOGGER
.
isDebugEnabled
())
{
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
String
.
format
(
"Result- key: %s, value: %s"
,
attr
.
getKey
(),
attr
.
getValue
()));
}
rItems
.
put
(
attr
.
getKey
(),
new
StringByteIterator
(
attr
.
getValue
().
getS
()));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment