Re: Review Request 43643: Do not materialize set inside DbTaskStore#fetchTasks

2016-02-17 Thread Stephan Erb

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43643/#review119428
---


Ship it!




Great catch! One minor nitpick below.


src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 
(line 567)


Would you mind changing this test slightly and assert the number of items 
before you wrap it in a set? This would allow us to catch duplicate elements 
without silently discarding those in the set constructor.

That's a rather unlikely scenario, but the impact would be quite severe.


- Stephan Erb


On Feb. 17, 2016, 4:42 a.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43643/
> ---
> 
> (Updated Feb. 17, 2016, 4:42 a.m.)
> 
> 
> Review request for Aurora, John Sirois and Maxim Khutornenko.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> The TaskStore interface requires an Interable to be returned. I have modified 
> DbTaskStore to take advantage of this and instead just return the List 
> MyBatis populates.
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/DbTaskStore.java 
> b899d0f11ea499e40298ea9020414997c4527821 
>   
> src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 
> dee34e29465d58adbc805cbb9c400e0328012ab8 
> 
> Diff: https://reviews.apache.org/r/43643/diff/
> 
> 
> Testing
> ---
> 
> Master:
> Benchmark  (numTasks)   Mode  Cnt   Score 
>   Error  Units
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run   1  thrpt5  51.531 
> ± 7.236  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run   5  thrpt5   7.370 
> ± 1.320  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run  10  thrpt5   2.143 
> ± 1.234  ops/s
> 
> This patch:
> Benchmark (numTasks)   Mode  Cnt  
> Score   Error  Units
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run  1  thrpt5  
> 93344.488 ± 21422.498  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run  5  thrpt5  
> 70160.553 ± 20418.670  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run 10  thrpt5  
> 29834.284 ± 10440.180  ops/s
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 43643: Do not materialize set inside DbTaskStore#fetchTasks

2016-02-17 Thread John Sirois

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43643/#review119457
---


Ship it!




Ship It!

- John Sirois


On Feb. 16, 2016, 8:42 p.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43643/
> ---
> 
> (Updated Feb. 16, 2016, 8:42 p.m.)
> 
> 
> Review request for Aurora, John Sirois and Maxim Khutornenko.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> The TaskStore interface requires an Interable to be returned. I have modified 
> DbTaskStore to take advantage of this and instead just return the List 
> MyBatis populates.
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/DbTaskStore.java 
> b899d0f11ea499e40298ea9020414997c4527821 
>   
> src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 
> dee34e29465d58adbc805cbb9c400e0328012ab8 
> 
> Diff: https://reviews.apache.org/r/43643/diff/
> 
> 
> Testing
> ---
> 
> Master:
> Benchmark  (numTasks)   Mode  Cnt   Score 
>   Error  Units
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run   1  thrpt5  51.531 
> ± 7.236  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run   5  thrpt5   7.370 
> ± 1.320  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run  10  thrpt5   2.143 
> ± 1.234  ops/s
> 
> This patch:
> Benchmark (numTasks)   Mode  Cnt  
> Score   Error  Units
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run  1  thrpt5  
> 93344.488 ± 21422.498  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run  5  thrpt5  
> 70160.553 ± 20418.670  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run 10  thrpt5  
> 29834.284 ± 10440.180  ops/s
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 43622: Updating scheduler backup restore instructions.

2016-02-17 Thread John Sirois

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43622/#review119459
---



I'd likewise like to run through the updated doc to confirm.  I'll have time to 
get that done before next Monday.

- John Sirois


On Feb. 16, 2016, 4:10 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43622/
> ---
> 
> (Updated Feb. 16, 2016, 4:10 p.m.)
> 
> 
> Review request for Aurora, John Sirois and Stephan Erb.
> 
> 
> Bugs: AURORA-1605
> https://issues.apache.org/jira/browse/AURORA-1605
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Updating scheduler backup restore instructions.
> 
> 
> Diffs
> -
> 
>   docs/storage-config.md c838ea3291bf21428d8dcb0be53651ca4ceb5dda 
>   docs/thrift-deprecation.md e1f1fbcfb119efa6b015d548266386a1486d932b 
> 
> Diff: https://reviews.apache.org/r/43622/diff/
> 
> 
> Testing
> ---
> 
> https://github.com/maxim111333/incubator-aurora/blob/backup_restore_instructions/docs/storage-config.md#recovering-from-a-scheduler-backup
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 43643: Do not materialize set inside DbTaskStore#fetchTasks

2016-02-17 Thread Maxim Khutornenko

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43643/#review119484
---


Ship it!




Ship It!

- Maxim Khutornenko


On Feb. 17, 2016, 3:42 a.m., Zameer Manji wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43643/
> ---
> 
> (Updated Feb. 17, 2016, 3:42 a.m.)
> 
> 
> Review request for Aurora, John Sirois and Maxim Khutornenko.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> The TaskStore interface requires an Interable to be returned. I have modified 
> DbTaskStore to take advantage of this and instead just return the List 
> MyBatis populates.
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/storage/db/DbTaskStore.java 
> b899d0f11ea499e40298ea9020414997c4527821 
>   
> src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java 
> dee34e29465d58adbc805cbb9c400e0328012ab8 
> 
> Diff: https://reviews.apache.org/r/43643/diff/
> 
> 
> Testing
> ---
> 
> Master:
> Benchmark  (numTasks)   Mode  Cnt   Score 
>   Error  Units
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run   1  thrpt5  51.531 
> ± 7.236  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run   5  thrpt5   7.370 
> ± 1.320  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run  10  thrpt5   2.143 
> ± 1.234  ops/s
> 
> This patch:
> Benchmark (numTasks)   Mode  Cnt  
> Score   Error  Units
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run  1  thrpt5  
> 93344.488 ± 21422.498  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run  5  thrpt5  
> 70160.553 ± 20418.670  ops/s
> TaskStoreBenchmarks.DBFetchTasksBenchmark.run 10  thrpt5  
> 29834.284 ± 10440.180  ops/s
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>



Re: Review Request 39073: Generalize plugin interface for aurora client.

2016-02-17 Thread Stephan Erb

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39073/#review119544
---



I believe this is quite useful. Brian, any interest in reviving this effort?

- Stephan Erb


On Oct. 7, 2015, 7:29 a.m., Brian Wickman wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39073/
> ---
> 
> (Updated Oct. 7, 2015, 7:29 a.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Generalize plugin interface for client.
> 
> 1. Renames ConfigurationPlugin to just Plugin, since you can register nouns; 
> aliases the two together
> 2. Adds get_nouns method that allows you to register new top-level commands
> 3. Searches entry_points for plugins registered under 
> apache.aurora.client.cli.plugin
> 
> I have used this to implement a proof-of-concept 'aurora deploy' staged 
> rollout framework as well as basic S3 integration (will publish to 
> github.com/wickman/sacker separately.)
> 
> 
> Diffs
> -
> 
>   src/main/python/apache/aurora/client/cli/__init__.py 
> c1c54549fd8718275041b54e1e91b070dadc05da 
> 
> Diff: https://reviews.apache.org/r/39073/diff/
> 
> 
> Testing
> ---
> 
> Used it to create a sacker plugin for aurora client.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>



Review Request 43669: AURORA-1616: [part 1] refactor tier management initialization to make it pluggable in tests.

2016-02-17 Thread Amol Deshmukh

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43669/
---

Review request for Aurora, Maxim Khutornenko and Bill Farner.


Repository: aurora


Description
---

AURORA-1616: [part 1] refactor tier management initialization to make it 
pluggable in tests. Also, renamed tiers-example.json to tiers.json.


Diffs
-

  docs/deploying-aurora-scheduler.md 5f89ca9d3bc5672ded954891a5fca269bd9608b3 
  examples/vagrant/upstart/aurora-scheduler-kerberos.conf 
53db93cef7f854885439c0d946a38ee1e07c8069 
  examples/vagrant/upstart/aurora-scheduler.conf 
70e56b02130b7f71e2278f53b7e9f6c50c89949c 
  src/main/java/org/apache/aurora/scheduler/SchedulerModule.java 
ddc0d0500b8788bc2c9dd67abb62a412465488b4 
  src/main/java/org/apache/aurora/scheduler/TierManager.java 
7367df4a030a3698518c9059aebcafc63c88e920 
  src/main/java/org/apache/aurora/scheduler/TierModule.java PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
cd9cb09a889984d9cb9d63b890093a075647dcbf 
  src/test/java/org/apache/aurora/scheduler/SchedulerModuleTest.java 
9dd05690c1abb068b57259e20415c10ad1697a97 
  src/test/java/org/apache/aurora/scheduler/TierManagerTest.java 
350b90b7333b5e8f195909eeca915ad91d7307fe 
  src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
39916f5ceffec788046a4cc4c4e33aed4d57513b 
  src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
4716b66307bad16ecf29ec977e033e31f090fc9d 
  src/test/resources/org/apache/aurora/scheduler/tiers-example.json  

Diff: https://reviews.apache.org/r/43669/diff/


Testing
---

* Ensure no references to tiers-example.json
```
$ fgrep tiers-example -r ./* || echo Not found   # No remaining references to 
tiers-example.json
Not found
```

* Double check references to tiers.json
```
$ ./gradlew clean && fgrep tiers.json -r ./*
...
BUILD SUCCESSFUL

Total time: 8.811 secs
./docs/deploying-aurora-scheduler.md:Example [tier configuration 
file](../src/test/resources/org/apache/aurora/scheduler/tiers.json).
./examples/vagrant/upstart/aurora-scheduler-kerberos.conf:  
-tier_config=/home/vagrant/aurora/src/test/resources/org/apache/aurora/scheduler/tiers.json
./examples/vagrant/upstart/aurora-scheduler.conf:  
-tier_config=/home/vagrant/aurora/src/test/resources/org/apache/aurora/scheduler/tiers.json
 \
./src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java:  
  + ResourceUtils.CLASSPATH_PREFIX + 
"org/apache/aurora/scheduler/tiers.json")
```

* Unit tests
```
$ ./gradlew clean test
...
BUILD SUCCESSFUL

Total time: 2 mins 40.529 secs
```

* End-to-end tests
```
$ ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
...
*** OK (All tests passed) ***
```


Thanks,

Amol Deshmukh



Re: Review Request 43669: AURORA-1616: [part 1] refactor tier management initialization to make it pluggable in tests.

2016-02-17 Thread Aurora ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43669/#review119548
---



Master (9d642dc) is red with this patch.
  ./build-support/jenkins/build.sh

:commons:generateThriftResources
:commons:processResources
:commons:classes
:commons:jar
:compileJava/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java:74:
 Note: Wrote forwarder 
org.apache.aurora.scheduler.storage.log.WriteAheadStorageForwarder
@Forward({
^
Note: Writing 
file:/home/jenkins/jenkins-slave/workspace/AuroraBot/dist/classes/main/org/apache/aurora/common/args/apt/cmdline.arg.info.txt.2
Note: Writing 
file:/home/jenkins/jenkins-slave/workspace/AuroraBot/dist/classes/main/META-INF/compiler/resource-mappings/org.apache.aurora.common.args.apt.CmdLineProcessor

:generateBuildProperties
:processResources
:classes
:jar
:startScripts
:distTar
:distZip
:assemble
:compileJmhJavaNote: 
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/jmh/java/org/apache/aurora/benchmark/fakes/FakeSchedulerDriver.java
 uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:processJmhResources UP-TO-DATE
:jmhClasses
:checkstyleJmh
:jsHint
:checkstyleMain[ant:checkstyle] 
/home/jenkins/jenkins-slave/workspace/AuroraBot/src/main/java/org/apache/aurora/scheduler/TierModule.java:1:
 error: Line does not match expected header line of '^\/\*\*$'.
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkstyleMain'.
> Checkstyle rule violations were found. See the report at: 
> file:///home/jenkins/jenkins-slave/workspace/AuroraBot/dist/reports/checkstyle/main.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output.

BUILD FAILED

Total time: 2 mins 14.961 secs


I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On Feb. 17, 2016, 11:06 p.m., Amol Deshmukh wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43669/
> ---
> 
> (Updated Feb. 17, 2016, 11:06 p.m.)
> 
> 
> Review request for Aurora, Maxim Khutornenko and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> AURORA-1616: [part 1] refactor tier management initialization to make it 
> pluggable in tests. Also, renamed tiers-example.json to tiers.json.
> 
> 
> Diffs
> -
> 
>   docs/deploying-aurora-scheduler.md 5f89ca9d3bc5672ded954891a5fca269bd9608b3 
>   examples/vagrant/upstart/aurora-scheduler-kerberos.conf 
> 53db93cef7f854885439c0d946a38ee1e07c8069 
>   examples/vagrant/upstart/aurora-scheduler.conf 
> 70e56b02130b7f71e2278f53b7e9f6c50c89949c 
>   src/main/java/org/apache/aurora/scheduler/SchedulerModule.java 
> ddc0d0500b8788bc2c9dd67abb62a412465488b4 
>   src/main/java/org/apache/aurora/scheduler/TierManager.java 
> 7367df4a030a3698518c9059aebcafc63c88e920 
>   src/main/java/org/apache/aurora/scheduler/TierModule.java PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
> cd9cb09a889984d9cb9d63b890093a075647dcbf 
>   src/test/java/org/apache/aurora/scheduler/SchedulerModuleTest.java 
> 9dd05690c1abb068b57259e20415c10ad1697a97 
>   src/test/java/org/apache/aurora/scheduler/TierManagerTest.java 
> 350b90b7333b5e8f195909eeca915ad91d7307fe 
>   src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
> 39916f5ceffec788046a4cc4c4e33aed4d57513b 
>   src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
> 4716b66307bad16ecf29ec977e033e31f090fc9d 
>   src/test/resources/org/apache/aurora/scheduler/tiers-example.json  
> 
> Diff: https://reviews.apache.org/r/43669/diff/
> 
> 
> Testing
> ---
> 
> * Ensure no references to tiers-example.json
> ```
> $ fgrep tiers-example -r ./* || echo Not found   # No remaining references to 
> tiers-example.json
> Not found
> ```
> 
> * Double check references to tiers.json
> ```
> $ ./gradlew clean && fgrep tiers.json -r ./*
> ...
> BUILD SUCCESSFUL
> 
> Total time: 8.811 secs
> ./docs/deploying-aurora-scheduler.md:Example [tier configuration 
> file](../src/test/resources/org/apache/aurora/scheduler/tiers.json).
> ./examples/vagrant/upstart/aurora-scheduler-kerberos.conf:  
> -tier_config=/home/vagrant/aurora/src/test/resources/org/apache/aurora/scheduler/tiers.json
> ./examples/vagrant/upstart/aurora-scheduler.conf:  
> -tier_config=/home/vagrant/aurora/src/test/resources/org/apache/aurora/scheduler/tiers.json
>  \
> ./src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java:
> + ResourceUtils.CLASSPATH_PREFIX + 
> "org/apache/aurora/scheduler/tiers.json")
> ```
> 
> * 

Re: Review Request 43669: AURORA-1616: [part 1] refactor tier management initialization to make it pluggable in tests.

2016-02-17 Thread Amol Deshmukh

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43669/
---

(Updated Feb. 17, 2016, 3:37 p.m.)


Review request for Aurora, Maxim Khutornenko and Bill Farner.


Changes
---

@ReviewBot retry

* Ensured checkstyle was good:
```
$ ./gradlew build -Pq
...
BUILD SUCCESSFUL

Total time: 3 mins 22.31 secs
```


Repository: aurora


Description
---

AURORA-1616: [part 1] refactor tier management initialization to make it 
pluggable in tests. Also, renamed tiers-example.json to tiers.json.


Diffs (updated)
-

  docs/deploying-aurora-scheduler.md 5f89ca9d3bc5672ded954891a5fca269bd9608b3 
  examples/vagrant/upstart/aurora-scheduler-kerberos.conf 
53db93cef7f854885439c0d946a38ee1e07c8069 
  examples/vagrant/upstart/aurora-scheduler.conf 
70e56b02130b7f71e2278f53b7e9f6c50c89949c 
  src/main/java/org/apache/aurora/scheduler/SchedulerModule.java 
ddc0d0500b8788bc2c9dd67abb62a412465488b4 
  src/main/java/org/apache/aurora/scheduler/TierManager.java 
7367df4a030a3698518c9059aebcafc63c88e920 
  src/main/java/org/apache/aurora/scheduler/TierModule.java PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 
cd9cb09a889984d9cb9d63b890093a075647dcbf 
  src/test/java/org/apache/aurora/scheduler/SchedulerModuleTest.java 
9dd05690c1abb068b57259e20415c10ad1697a97 
  src/test/java/org/apache/aurora/scheduler/TierManagerTest.java 
350b90b7333b5e8f195909eeca915ad91d7307fe 
  src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java 
39916f5ceffec788046a4cc4c4e33aed4d57513b 
  src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java 
4716b66307bad16ecf29ec977e033e31f090fc9d 
  src/test/resources/org/apache/aurora/scheduler/tiers-example.json  

Diff: https://reviews.apache.org/r/43669/diff/


Testing
---

* Ensure no references to tiers-example.json
```
$ fgrep tiers-example -r ./* || echo Not found   # No remaining references to 
tiers-example.json
Not found
```

* Double check references to tiers.json
```
$ ./gradlew clean && fgrep tiers.json -r ./*
...
BUILD SUCCESSFUL

Total time: 8.811 secs
./docs/deploying-aurora-scheduler.md:Example [tier configuration 
file](../src/test/resources/org/apache/aurora/scheduler/tiers.json).
./examples/vagrant/upstart/aurora-scheduler-kerberos.conf:  
-tier_config=/home/vagrant/aurora/src/test/resources/org/apache/aurora/scheduler/tiers.json
./examples/vagrant/upstart/aurora-scheduler.conf:  
-tier_config=/home/vagrant/aurora/src/test/resources/org/apache/aurora/scheduler/tiers.json
 \
./src/test/java/org/apache/aurora/scheduler/app/local/LocalSchedulerMain.java:  
  + ResourceUtils.CLASSPATH_PREFIX + 
"org/apache/aurora/scheduler/tiers.json")
```

* Unit tests
```
$ ./gradlew clean test
...
BUILD SUCCESSFUL

Total time: 2 mins 40.529 secs
```

* End-to-end tests
```
$ ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
...
*** OK (All tests passed) ***
```


Thanks,

Amol Deshmukh



Re: Review Request 42656: Don't destroy session between requests with TRequestsTransport

2016-02-17 Thread Kunal Thakar

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42656/
---

(Updated Feb. 18, 2016, 12:01 a.m.)


Review request for Aurora and Stephan Erb.


Changes
---

Removed open/close entirely from flush


Repository: aurora


Description
---

As an API consumer, I want the API client to reuse open connections and not 
create a new one for every query.


Diffs (updated)
-

  src/main/python/apache/aurora/common/transport.py 
909021ac203185862267d4359d332fc169a06b7e 
  src/test/python/apache/aurora/common/test_transport.py 
1f589a9ae08e1f13be34ad6002ceb11a43fdeb5f 

Diff: https://reviews.apache.org/r/42656/diff/


Testing
---

./pants test.pytest src/test/python::


Thanks,

Kunal Thakar



Re: Review Request 42656: Don't destroy session between requests with TRequestsTransport

2016-02-17 Thread Aurora ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42656/#review119561
---



Master (9d642dc) is red with this patch.
  ./build-support/jenkins/build.sh

   handler = ReadOnlySchedulerHandler()
   processor = 
ReadOnlyScheduler.Processor(handler)
   pfactory = 
TJSONProtocol.TJSONProtocolFactory()
   server = THttpServer.THttpServer(processor, 
('localhost', 0), pfactory)
   server_thread = Thread(target=server.serve)
   server_thread.start()
   _, server_port = 
server.httpd.socket.getsockname()
 
   try:
 transport = 
TRequestsTransport('http://localhost:%d' % server_port)
 protocol = 
TJSONProtocol.TJSONProtocol(transport)
 client = ReadOnlyScheduler.Client(protocol)
 >   client.getRoleSummary()
 
 
src/test/python/apache/aurora/common/test_transport.py:194: 
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 
.pants.d/python-setup/chroots/62842f64d44dfb8a1ac3e9b3ead8f6af1e207916/.deps/api.src.main.thrift.org.apache.aurora.gen._api_c7736d29-0.0.0-py2-none-any.whl/gen/apache/aurora/api/ReadOnlyScheduler.py:147:
 in getRoleSummary
 self.send_getRoleSummary()
 
.pants.d/python-setup/chroots/62842f64d44dfb8a1ac3e9b3ead8f6af1e207916/.deps/api.src.main.thrift.org.apache.aurora.gen._api_c7736d29-0.0.0-py2-none-any.whl/gen/apache/aurora/api/ReadOnlyScheduler.py:155:
 in send_getRoleSummary
 self._oprot.trans.flush()
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 
 self = 
 
 def flush(self):
   data = self.__wbuf.getvalue()
   self.__wbuf = BytesIO()
 
 > self._session.headers['Content-Type'] = 
'application/x-thrift'
 E AttributeError: 'NoneType' object has no 
attribute 'headers'
 
 
.pants.d/python-setup/chroots/62842f64d44dfb8a1ac3e9b3ead8f6af1e207916/apache/aurora/common/transport.py:117:
 AttributeError
  generated xml file: 
/home/jenkins/jenkins-slave/workspace/AuroraBot/dist/test-results/415337499eb72578eab327a6487c1f5c9452b3d6.xml
 
  7 failed, 655 passed, 5 skipped, 1 warnings in 
332.52 seconds 
 
FAILURE


00:19:32 06:29   [complete]
   FAILURE


I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On Feb. 18, 2016, 12:01 a.m., Kunal Thakar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42656/
> ---
> 
> (Updated Feb. 18, 2016, 12:01 a.m.)
> 
> 
> Review request for Aurora and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> As an API consumer, I want the API client to reuse open connections and not 
> create a new one for every query.
> 
> 
> Diffs
> -
> 
>   src/main/python/apache/aurora/common/transport.py 
> 909021ac203185862267d4359d332fc169a06b7e 
>   src/test/python/apache/aurora/common/test_transport.py 
> 1f589a9ae08e1f13be34ad6002ceb11a43fdeb5f 
> 
> Diff: https://reviews.apache.org/r/42656/diff/
> 
> 
> Testing
> ---
> 
> ./pants test.pytest src/test/python::
> 
> 
> Thanks,
> 
> Kunal Thakar
> 
>