jruby

Count number of records in a column family in an HBase table

蓝咒 提交于 2019-12-23 14:02:01
问题 I'm looking for an HBase shell command that will count the number of records in a specified column family. I know I can run: echo "scan 'table_name'" | hbase shell | grep column_family_name | wc -l however this will run much slower than the standard counting command: count 'table_name' , CACHE => 50000 (because the use of the CACHE=>50000) and worse - it doesn't return the real number of records, but something like the total number of cells (if I'm not mistaken?) in the specified column

Performance difference between MRI Ruby and jRuby

怎甘沉沦 提交于 2019-12-23 10:44:02
问题 While doing some benchmarking to answer this question about the fastest way to concatenate arrays I was surprised that when I did the same benchmarks in with jRuby the tests were a lot slower. Does this mean that the old adagio about jRuby being faster than MRI Ruby is gone ? Or is this about how arrays are treated in jRuby ? Here the benchmark and the results in both MRI Ruby 2.3.0 and jRuby 9.1.2.0 Both run on a 64bit Windows 7 box, all 4 processors busy for 50-60%, memory in use ± 5.5GB.

Performance difference between MRI Ruby and jRuby

折月煮酒 提交于 2019-12-23 10:43:13
问题 While doing some benchmarking to answer this question about the fastest way to concatenate arrays I was surprised that when I did the same benchmarks in with jRuby the tests were a lot slower. Does this mean that the old adagio about jRuby being faster than MRI Ruby is gone ? Or is this about how arrays are treated in jRuby ? Here the benchmark and the results in both MRI Ruby 2.3.0 and jRuby 9.1.2.0 Both run on a 64bit Windows 7 box, all 4 processors busy for 50-60%, memory in use ± 5.5GB.

Rails app on JRuby 1.7 in Nailgun mode does not start

别说谁变了你拦得住时间么 提交于 2019-12-23 07:27:30
问题 I installed JRuby 1.7.2 in RVM, created a gemset, executed bundle install. Now, I run this: Term 1: [lzap@lzapx my_app]$ bundle exec jruby --ng-serv NGServer started on all interfaces, port 2113. Term 2: [lzap@lzapx my_app]$ JRUBY_OPTS="--1.9 --ng" bundle exec rails s The issue is nothing happens, on both sides the terminals do not print anything, it just hangs forever. Top does not show any java/jruby processes working. If I try to start the application without --ng, it works okay. What is

Already initialized constant in jruby-openssl

淺唱寂寞╮ 提交于 2019-12-23 07:00:35
问题 When running my rails application on torquebox, I get a lot of already initialized constant: ... warnings that originate from gems/jruby-openssl-0.8.2/lib/shared/jruby-openssl.rb:16 . Is this a security problem? Is there any way to get rid of these warnings? 回答1: I could finally get rid of it by removing the gem altogether. According to this source, jruby-openssl is now directly pulled into the jruby project and is not needed anymore as gem. Thanks everyone for looking into this with me. 回答2:

Can SonarQube connect Azure SQL Database?

自作多情 提交于 2019-12-23 05:44:40
问题 My SonarQube is running on VM instance of Microsoft Azure. Now the SonarQube's database is MySQL, and I'm trying to change MySQL to Azure SQL Database, but SonarQube couldn't connect Azure SQL Database by some erroes which occured at ActiveRecord component. I know SonarQube doesn't support Azure SQL Database officially and support SQL Server below, nevertheless Azure SQL Database is compatible with SQL Server, so It's may possible to connect Azure SQL Database. Please tell me how to connect

adding to a jruby class's getDeclaredMethods()

混江龙づ霸主 提交于 2019-12-23 04:25:09
问题 I have a JRuby class that inherits from a java class (java.util.HashMap, for example). 3rd party java code is calling a reflective method like getDeclaredMethods() on my class's java instance's getClass() type. I need to push my method(s) defined in my ruby class (HM) into these "declared methods" before the it gets translated to java so they appear to the 3rd party java class. Anyone know a way? Here's my jruby code: require 'java' class HM < java.util.HashMap; end hm = HM.new puts hm

How to get project to use JRuby instead of Ruby on Windows

∥☆過路亽.° 提交于 2019-12-23 04:21:15
问题 I'm trying to stand up a JRuby/Ruby-on-Rails environment on a Windows VM. As a result, I installed Ruby, Rails and the items from the RailsInstaller download. I then installed JRuby. Everything installed and I see both when I do jruby -v and ruby -v . How do I get my Rails project to recognize JRuby instead of Ruby? Can I achieve this without installing RVM? Should I just install RVM on the Windows VM (which I was trying to avoid, but, maybe I shouldn't)? Do I just put a line in the Gemfile ?

Porting a Ruby/Rails/MRI app to JRuby

六眼飞鱼酱① 提交于 2019-12-23 02:36:07
问题 I have a Ruby/Rails devvelopment environment using rbenv, MRI Ruby (1.9.2-p290), rails 3.0.9, and SQLite3. I would like to port it to JRuby, but do it such that I don't have to do anything more than run "rbenv local jruby-1.6.4" and "rails server" in the root directory of the Rails application to use it with JRuby, and "rbenv local 1.9.2-p290" and "rails serer" to use it with MRI Ruby. I am aware that the gems to access SQLite are different for Ruby versus JRuby, but how do you write the

Executing rake tasks on an exploded war on tomcat without jruby being installed

陌路散爱 提交于 2019-12-22 12:54:29
问题 My rails project is deployed to tomcat with the help of warbler, but I need to be able to run rake tasks on that server. 回答1: Stay tuned. I hope to have this capability in Warbler 1.4. Jake Goulding, a community member, has been doing some great work on this. Until then, a typical approach would be to ensure all your Rake and database scripts are present in the war file, then just unpack it somewhere, cd to WEB-INF inside the unpacked war, and run something like java -cp lib/jruby-core*.jar