LucidDbUserFaq

From Eigenpedia

Jump to: navigation, search

Contents

FAQ List

This page is the FAQ list for LucidDB users. For questions about the project, see the project FAQ on the website.

Startup Error For libaio

Question:

I got the error below on startup. How do I fix it?

Loading database...
Exception in thread "main" org.eigenbase.util.EigenbaseException: Failed to load database
    at net.sf.farrago.resource.FarragoResource$_Def1.ex(FarragoResource.java:1789)
    at net.sf.farrago.db.FarragoDatabase.<init>(FarragoDatabase.java:269)
    at net.sf.farrago.db.FarragoDbSingleton.pinReference(FarragoDbSingleton.java:89)
    at net.sf.farrago.server.FarragoAbstractServer.start(FarragoAbstractServer.java:183)
    at com.lucidera.farrago.LucidDbServer.main(LucidDbServer.java:61)
Caused by: org.eigenbase.util.EigenbaseException: FennelResource.en_US.libaioRequired()
    at net.sf.farrago.resource.FarragoResource$_Def0.ex(FarragoResource.java:1766)
    at net.sf.farrago.fennel.FennelDbHandle.handleNativeException(FennelDbHandle.java:315)
    at net.sf.farrago.fennel.FennelDbHandle.executeCmd(FennelDbHandle.java:242)
    at net.sf.farrago.fennel.FennelDbHandle.<init>(FennelDbHandle.java:90)
    at net.sf.farrago.db.FarragoDatabase.loadFennel(FarragoDatabase.java:509)
    at net.sf.farrago.db.FarragoDatabase.<init>(FarragoDatabase.java:189)
    ... 3 more

Answer:

On a Debian-based system such as Ubuntu:

apt-get install libaio

On A RedHat-based system:

yum install libaio

After that, you should be able to start the server. If you keep the default setting of aioLinux, you'll want to increase LucidDB's buffer pool size, and also preallocate data files, as mentioned in LucidDbPerformanceTuning#I.2FO_Scheduler.

Startup Error For mmap

Question:

I got the error below on startup, or when trying to increase the buffer pool size. How do I fix it?

Error: System call failed:  mmap failed: Cannot allocate memory (state=,code=0)

Answer:

Assuming you actually have sufficient physical memory, and are using a 64-bit build if trying to allocate a large buffer pool, check these:

  1. Make sure ulimit -v returns the string "unlimited". Setting a quota on virtual memory size can cause the error above.
  2. Make sure you aren't accidentally using a debug build. Debug builds use mprotect to guard against buffer overruns, and this eats up a lot of additional memory and OS page table space.

Loading Large Data Files

Question:

I have a large data file in txt format. I need to bulk load it into Lucid tables. What's the best way to do this?

Answer:

Create a flat file foreign table corresponding to your flat file, and then use an INSERT-SELECT statement to load from the flat file table to your target table.

See LucidDbFlatFileWrapper for details.

LucidDbEtlTutorial#Define_Sources also has an example that shows you how to create a flatfile foreign data wrapper, import it, and then access tables within the imported foreign schema.

ETL Tutorial

Question:

In attempting to follow the ETL Tutorial I got an error because directory examples/etl/filedata/ does not exist. What should I do?

Answer

Make sure you followed the instructions to start the server like this:

bin/lucidDbServer

The tutorial relies on this for the relative paths to come out right. Otherwise, you need to edit the scripts so that they supply absolute paths.

Case-Sensitive Foreign Schema Name

Question:

I'm trying to import a foreign schema from a server like PostgreSQL with case-sensitive identifiers, and I'm not getting any tables back. How come?

Answer

Make sure you quote the foreign schema name in the IMPORT FOREIGN SCHEMA command:

import foreign schema "public"
from server postgres_abc
into ldb_schema 

Likewise for foreign tables.

Default Port

Question:

What is the default listening port number for LucidDB?

Answer:

By default, LucidDB's RMI registry listens on port 5434. If you want to specify it explicitly from the client side, use a URL like

jdbc:luciddb:rmi://1.2.3.4:5434

You can change a server's port number by setting system parameter serverRmiRegistryPort; see LucidDbSystemParameters for more information.

JDBC Driver Class

Question:

I'm trying to connect to LucidDB from my own program, but I always get an exception like java.lang.ClassNotFoundException: com.lucidera.jdbc.LucidDbRmiDriver. What should I do to fix it?

Answer:

Make sure you have luciddb/plugin/LucidDbClient.jar on your program's classpath.

Question:

I'm trying to use LucidDbLocalDriver to access the server from a client program running on the same (local) machine, but it doesn't work. Why not?

Answer:

The "local" driver is local only in the sense "in the same java process", not in the sense "on the same machine", so you'll need to use the RMI driver. Use driver class com.lucidera.jdbc.LucidDbRmiDriver unless the client and server are actually running in the same JVM.

Missing Columns

Question:

I created a wide table, and some of the columns seem to have gone AWOL. What gives?

Answer:

If you're using sqlline, see this mailing list thread.

J2EE Embedding

Question:

How do I run LucidDB inside of a J2EE app server?

Answer:

See LucidDbAsManagedBean.

Catalog File Locking

Question:

I got an exception about "Failed to lock catalog file" on server startup; what does this mean?

Answer:

It means you already have a server process running from the same installation, and only one can be running at a time. See this mailing list thread. For information on how to start LucidDB on a remote server, see this thread.

Debug Builds

Question:

I built LucidDB from source and now it's really slow. How come?

Answer:

By default, initBuild.sh produces an unoptimized debug build, which is an order of magnitude slower than release builds. Be sure to specify the --with-optimization --without-debug flags to match the release configuration, unless you're actually planning to hack on LucidDB native code and use gdb.