Archive for the 'popular' Category
Cygwin Vs. Hadoop – DFS Copy
Cygwin makes Hadoop MUCH harder to run.
If you’re having problems setting up your DFS file share under Cygwin, see what happened to me. Notice that you have to use the WINDOWS path (C:\\cygwin\\home\\Rajat\\…..) With escape characters.
Rajat@rtde ~/hadoop-0.20.1
$ bin/hadoop dfs -copyFromLocal /home/Rajat/java/mrh/input inputs
copyFromLocal: File /home/Rajat/java/mrh/input does not exist.
Rajat@rtde ~/hadoop-0.20.1
$ bin/hadoop dfs -copyFromLocal C:\cygwin\home\Rajat\java\mrh\input input
copyFromLocal: File C:cygwinhomeRajatjavamrhinput does not exist.
Rajat@rtde ~/hadoop-0.20.1
$ bin/hadoop dfs -copyFromLocal C:\\cygwin\\home\\Rajat\\java\\mrh\\input input
(((THIS WORKED)))
Test:
Rajat@rtde ~/hadoop-0.20.1
$ bin/hadoop dfs -ls
Found 1 items
drwxr-xr-x – Rajat supergroup 0 2009-12-16 23:30 /user/Rajat/input
Rajat@rtde ~/hadoop-0.20.1
$ bin/hadoop dfs -ls input
Found 1 items
-rw-r–r– 1 Rajat supergroup 683956 2009-12-16 23:30 /user/Rajat/input/162523852.csv
Can’t compile the example WordCount.java (Hadoop)
http://mail-archives.apache.org/mod_mbox/hadoop-common-user/200907.mbox/%3Cd6d7c4410907201717t672e4caet3f369d7e4327ff7b@mail.gmail.com%3E
Seen this?
Rajat@rtde ~/java
$ javac -classpath /home/Rajat/hadoop-0.20.1/hadoop-0.20.1-core.jar -d
wordcount_classes WordCount.javaWordCount.java:5: package org.apache.hadoop.fs does not exist
import org.apache.hadoop.fs.Path;WordCount.java:6: package org.apache.hadoop.conf does not exist
import org.apache.hadoop.conf.*;
^
WordCount.java:7: package org.apache.hadoop.io does not exist
import org.apache.hadoop.io.*;
^
WordCount.java:8: package org.apache.hadoop.mapred does not exist
import org.apache.hadoop.mapred.*;
^
WordCount.java:9: package org.apache.hadoop.util does not exist
import org.apache.hadoop.util.*;
And running CygWin on Windows? Tried everything for your classpath
huh? Try this:
$ javac -verbose -classpath C:\\cygwin\\home\\Rajat\\hadoop-0.20.1\\hadoop-0.20.1-core.jar -d wordcount_classes WordCount.java
(Change your cygwin path, obviously)
Use the -verbose flag to show the entire class search path.
ScrubyT traverse_for_match: undefined method each for nil:NilClass
Using ScrubyT, a Ruby on Rails plugin, on a Linux system such as my CentOS 5 VPS, you can get an error message and stack trace like this:
/usr/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/shared_utils.rb:43:in `traverse_for_match’: undefined method `each’ for nil:NilClass (NoMethodError)
If you see this, go to shared_utils.rb in the path above, and change this block:
node.children.each { |child| traverse_for_m….
into this:
if node.children
node.children.each { |child| traverse_for_m….
end
Thanks to Deginzabi who wrote about it in Japanese. This article is a translation of what he said. Hope this makes the next ScrubyT release! It is a great project.
Google Talk – Invisible Mode
Did you know that you can use “Invisible Mode” in the Google Talk app? This is not the web application, but the genuine standalone Google Talk app. You don’t have to use the GTalk applet that is embedded in Gmail any longer, and can avoid cyberstalkers with class and sophistication!
Here is the link to the version of GTalk you’re interested in – Google Talk Labs Edition:
http://www.google.com/talk/labsedition/index.html
I would recommend uninstalling the ordinary version of Gtalk first, otherwise the two will be installed side by side and become an annoyance.

auto_complete with Rails 2.2
This page is about the auto_complete plugin for scriptaculous & Ruby on Rails 2.2. After looking through tons of pages and following countless dead links, here are the problems I had and how to fix them.
Error:
undefined method `text_field_with_auto_complete' for #<ActionView::Base:0x478d5e4>
Answer:
Install the auto_complete plugin.
command:ruby script/plugin install git://github.com/rails/auto_complete.git
Error:
ruby script/plugin install git://github.com/rails/auto_complete.git
removing: C:/Dropbox/My Dropbox/Ruby/mc/vendor/plugins/auto_complete/.git
Answer:
You don't have GIT installed. Its like a package manager. Get it from:http://git-scm.com/download
Error:
ruby script/plugin remove auto_complete
Plugin doesn't exist: C:/Dropbox/My Dropbox/Ruby/mcvendor/plugins/auto_complete
Answer:
Duh, it isn't installed. Install as directed above.
Error:
Just doesn't seem to work.
Answer:
Restart rails
Do the error logs tell you something?
Go over this article with a fine toothed comb:http://www.slash7.com/articles/2005/08/13/ajaxariffic-autocomplete-with-scriptaculous
Error:
ActionController::InvalidAuthenticityToken in your development.log
Answer:
There is a cross-site scripting protection that must be turned off.
Add this to your controller:
skip_before_filter :verify_authenticity_token
How to Re-activate Netflix on your XBox 360
My Room mate got excited when NXE came out for the xbox 360. He downloaded and activated the Netflix app for Xbox 360 while I was out of town. But he doesn’t have an unlimited account, or good taste in movies for that matter. Here are some quick directions to get rid of your existing activation code and input a new one.
1. In the Guide, select the Settings blade, and then select System Settings.
2. Select Memory.
3. Select Hard Drive or Memory Card.
4. Select Games.
5. Locate any select items that refer to “Netflix.”
6. Press the A button to delete the items.
7. Exit to the Xbox 360 Dashboard.
8. Open the Video Marketplace.
9. Select Netflix.
10. Confirm the download, and follow any on-screen prompts to reconfigure Netflix on your Xbox 360 console.
You will now get a new activation code.
At this point, Netflix actually told me to “FUX OF” , but i’m persistent like that and i got a new activation.
I use ad revenue to pay for my hosting. So if you found my tip useful please …
2 comments
