Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Commit

Permalink
add reverse option in MultiGetOptions to support search in reverse di…
Browse files Browse the repository at this point in the history
…rection for multiGet

Summary: Ref T10566

Test Plan: N/A

Reviewers: sunweijie, cailiuyang

Reviewed By: sunweijie

Subscribers: #pegasus

Maniphest Tasks: T10566

Differential Revision: https://phabricator.d.xiaomi.net/D87870
  • Loading branch information
qinzuoyan committed Mar 20, 2018
1 parent 15be374 commit cdba5e4
Show file tree
Hide file tree
Showing 28 changed files with 777 additions and 40 deletions.
18 changes: 13 additions & 5 deletions idl/recompile_thrift.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
#!/bin/bash

# method to get thrift 0.11.0:
# 1. get the source code from http://mirrors.tuna.tsinghua.edu.cn/apache/thrift/0.11.0/thrift-0.11.0.tar.gz
# 2. tar xvf thrift-0.11.0.tar.gz & cd thrift-0.11.0
# 3. ./configure --with-csharp=no --with-java=no --with-python=no --with-erlang=no --with-perl=no --with-php=no --with-ruby=no --with-haskell=no --with-php_extension=no --with-rs=no
# 4. make && sudo make install
# wget http://mirrors.tuna.tsinghua.edu.cn/apache/thrift/0.11.0/thrift-0.11.0.tar.gz
# tar xvf thrift-0.11.0.tar.gz
# cd thrift-0.11.0
# ./configure --with-csharp=no --with-java=no --with-python=no --with-erlang=no --with-perl=no \
# --with-php=no --with-ruby=no --with-haskell=no --with-php_extension=no --with-rs=no --with-go=no
# make
# sudo make install
#
# Note: by default the thrift will be installed in /usr/local. If you'd like to install it somewhere else, you'd better with --prefix=... in step 3
# Note: by default the thrift will be installed in /usr/local. If you'd like to install it somewhere else,
# you'd better provide install path with option `--prefix=xxx'.

thrift=thrift
if ! $thrift -version | grep "0.11.0" ; then
echo "ERROR: thrift version should be 0.11.0"
exit 1
fi

TMP_DIR=./gen-java
rm -rf $TMP_DIR
Expand Down
1 change: 1 addition & 0 deletions idl/rrdb.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ struct multi_get_request
9:bool stop_inclusive;
10:filter_type sort_key_filter_type;
11:base.blob sort_key_filter_pattern;
12:bool reverse; // if search in reverse direction
}

struct multi_get_response
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.3</version>
<configuration>
Expand All @@ -138,6 +139,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down
8 changes: 4 additions & 4 deletions src/assembly/dep.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@
<fileSets>
<fileSet>
<directory>${project.basedir}/configuration</directory>
<outputDirectory>/</outputDirectory>
<outputDirectory></outputDirectory>
<includes>
<include>*</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/scripts</directory>
<outputDirectory>/</outputDirectory>
<outputDirectory></outputDirectory>
<includes>
<include>*</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>/</outputDirectory>
<outputDirectory></outputDirectory>
<includes>
<include>*.jar</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.build.directory}/library</directory>
<outputDirectory>/library</outputDirectory>
<outputDirectory>library</outputDirectory>
<includes>
<include>*.jar</include>
</includes>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main/java/com/xiaomi/infra/pegasus/apps/key_value.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main/java/com/xiaomi/infra/pegasus/apps/meta.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

106 changes: 101 additions & 5 deletions src/main/java/com/xiaomi/infra/pegasus/apps/multi_get_request.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cdba5e4

Please sign in to comment.