2010
08.27

When creating extracts in Tableau, make sure to verify the ROWSETLIMIT parameter for the user connecting to Netezza.

From the manual:

ROWSETLIMIT: Specifies the number of rows a query can return. You can specify
from 1 to 2,147,483,647 rows or zero for unlimited.

For some strange reason, this parameter doesn’t affect direct queries from Tableau Desktop or Server. However, when creating extracts, the number of rows returned will be limited (silently) by ROWSETLIMIT.

To change the value:

ALTER USER tableau WITH ROWSETLIMIT 10000;
Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2010
08.12

And it’s successful!

The job finished in 24 hours

The job finished in 24 hours

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2010
08.10

I never remember the syntax of Null Providers in Google Guice, posting it here for future reference.

Given a Foo feature (i.e. a Foo interface, implemented by FooImpl), the Guice config may look like:

if (isFooEnabled) {
    binder.bind(Foo.class).to(FooImpl.class);
    log.info("Foo feature enabled");
} else {
    binder.bind(Foo.class).toProvider(Providers.<Foo>of(null));
}

Don’t forget to make Foo @Nullable:

@Inject
public Something(
    @Nullable Foo foo
)
{
   this.foo = foo;
}

See a real-life example in Goodwill on github.

2010
08.04

We are in the process of open-sourcing most of the Hadoop infrastructure at Ning. Look for my blog entries on the Ning code blog:

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2009
12.14

A new contributor joined the HDT family! Jetrii managed to find some time to get us a logo and a custom design for the trac.

We launched it on Sunday. It is not fully ready yet – but you can see it in action: hdt-project.org.

Let us know what you think.

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2009
12.13

COMPILE THIS

main(k){float i,j,r,x,y=-16;while(puts(""),y++<15)for(x
=0;x++<84;putchar(" .:-;!/>)|&IH%*#"[k&15]))for(i=k=r=0;
j=r*r-i*i-2+x/25,i=2*r*i+y/10,j*j+i*i<11&&k++<111;r=j);}

More neat experiments on Ken Perlin’s homepage: http://su.pr/28J8iV.

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2009
12.02

Solaris 10 Zones fact of the day: SMBIOS data is not exported to the zones, only the host can have access to the structure:

% /usr/sbin/smbios -B
smbios: System does not export an SMBIOS table
% prtdiag
prtdiag: failed to open SMBIOS: System does not export an SMBIOS table

Is that configurable somehow?

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2009
12.01

A friend of mine pointed me to some Daemon initialization code which looked like

...
return pid if pid = fork
File.umask 0000
...

Setting the umask to 0 is quite common when writing daemons to avoid making any assumption with respect to the current umask set for the shell/parent running the daemon (the primary goal of a umask is to restrict permissions).

If the child doesn’t leverage this freedom though and doesn’t specify the permission masks when calling open(), files created will likely have -rw-rw-rw- and directories drwxrwxrwx. This can be bad as the umask will be also inherited to all child processes spawned…

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2009
11.30

If you are using FileUtils, note the following behavior with ruby 1.9: attributes are not preserved by default when copying a file.

Consider the following script:

require 'fileutils'

MY_FILE = "/tmp/foo"
MY_FILE2 = "/tmp/foo2"

FileUtils.touch MY_FILE
FileUtils.chmod 0755, MY_FILE
puts (File.executable? MY_FILE)
FileUtils.cp MY_FILE, MY_FILE2
puts (File.executable? MY_FILE2)

With ruby 1.8.6:

~ > /usr/local/bin/ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux]
~ > /usr/local/bin/ruby fileutils_chmodx.rb
true
true

With ruby 1.8.9:

~ > ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]
~ > ruby fileutils_chmodx.rb
true
false

Originally reported upstream here, the default behavior in ruby 1.9 will be to open files with the umask instead of preserving the attributes by default (see diff here). Use :preserve => true argument to override this behavior.

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us
2009
11.20

Django built-in shell can be painful to use. Be sure to checkout django-command-extensions to increase your productivity.

This Django application provides several extensions to the manage script, among them shell_plus which auto-loads your models and has readline support.

Download it here.

Share and Enjoy:
  • Twitter
  • Facebook
  • StumbleUpon
  • Google Bookmarks
  • LinkedIn
  • email
  • Slashdot
  • Digg
  • Netvibes
  • del.icio.us