Get an introduction to using Oracle Data Integrator, Java-based middleware that uses the database to perform set-based data integration tasks in an SOA.
Hi,
I have a log file that gets updated every second. Currently the size has grown to 20+ GB. I need to have a command/script, that will try to get the actual size of the file and will remove 50% of the data that are in the log file. I don't mind removing the data as the size has grown to huge... (8 Replies)
# date +%s -d "Mon Feb 11 02:26:04"
1360567564
# perl -e 'print scalar localtime(1360567564), "\n";'
Mon Feb 11 02:26:04 2013
the epoch conversion is working fine. but one of my application needs 13 digit epoch time as input
1359453135154
rather than 10 digit epoch time 1360567564... (3 Replies)
Dear experts,
I have an epoch time input file such as : -
1302451209564
1302483698948
1302485231072
1302490805383
1302519244700
1302492787481
1302505299145
1302506557022
1302532112140
1302501033105
1302511536485
1302512669550
I need the epoch time above to be converted into real... (4 Replies)
When I run "/etc/myApp" I am presented with continuous output, just about once per second.
However when I try to get the information in Perl via a piped open, it waits till the end to give me anything... my code:
open (OUTPUT,"/etc/myApp |");
while (<OUTPUT>){
print $_;
}... (2 Replies)
Newbie question:
I wrote korn shell script that lets me connect to a cisco switch thru telnet from sun server. I'm wodering if or what command i would use to capture info that is being sent to standard output when the script is running. Putting part of my script below and results.
#!/bin/ksh... (2 Replies)
Data::ObjectDriver::Driver::Partition(3pm) User Contributed Perl Documentation Data::ObjectDriver::Driver::Partition(3pm)NAME
Data::ObjectDriver::Driver::Partition - base class for partitioned object drivers
SYNOPSIS
package SomeObject;
__PACKAGE__->install_properties({
...
primary_key => 'id',
driver => Data::ObjectDriver::Driver::Partition->new(get_driver => &find_partition),
});
# Say we have a list of 5 arrayrefs of the DBI driver information.
my @DBI_INFO;
sub find_partition {
my ($part_key, $args) = @_;
my $id;
if (ref $terms && ref $terms eq 'HASH') {
# This is a search($terms, $args) call.
my $terms = $part_key;
$id = $terms->{id}
or croak "Can't determine partition from a search() with no id field";
}
else {
# This is a lookup($id) or some method invoked on an object where we know the ID.
my $id = $part_key;
}
# "ID modulo N" is not a good partitioning strategy, but serves as an example.
my $partition = $id % 5;
return Data::ObjectDriver::Driver::DBI->new( @{ $DBI_INFO[$partition] } );
}
DESCRIPTION
Data::ObjectDriver::Driver::Partition provides the basic structure for partitioning objects into different databases. Using partitions, you
can horizontally scale your application by using different database servers to hold sets of data.
To partition data, you need a certain criteria to determine which partition data goes in. Partition drivers use a "get_driver" function to
find the database driver for the correct partition, given either the arguments to a "search()" or the object's primary key for a
"lookup()", "update()", etc where the key is known.
SUGGESTED PRACTICES
While you can use any stable, predictable method of selecting the partition for an object, the most flexible way is to keep an
unpartitioned table that maps object keys to their partitions. You can then look up the appropriate record in your get_driver method to
find the partition.
For many applications, you can partition several classes of data based on the ID of the user account that "owns" them. In this case, you
would include the user ID as the first part of a complex primary key.
Because multiple objects can use the same partitioning scheme, often Data::ObjectDriver::Driver::Partition is subclassed to define the
"get_driver" function once and automatically specify it to the Data::ObjectDriver::Driver::Partition constructor.
Note these practices are codified into the Data::ObjectDriver::Driver::SimplePartition class.
USAGE
"Data::ObjectDriver::Driver::Partition->new(%params)"
Creates a new partitioning driver. The required members of %params are:
o "get_driver"
A reference to a function to be used to retrieve for a given object or set of search terms. Your function is invoked as either:
o "get_driver(\%terms, \%args)"
Return a driver based on the given "search()" parameters.
o "get_driver($id)"
Return a driver based on the given object ID. Note that $id may be an arrayref, if the class was defined with a complex primary
key.
o "pk_generator"
A reference to a function that, given a data object, generates a primary key for it. This is the same "pk_generator" given to
"Data::ObjectDriver"'s constructor.
"$driver->search($class, $terms, $args)"
"$driver->lookup($class, $id)"
"$driver->lookup_multi($class, @ids)"
"$driver->exists($obj)"
"$driver->insert($obj)"
"$driver->update($obj)"
"$driver->remove($obj)"
"$driver->fetch_data($what)"
Performs the named action, by passing these methods through to the appropriate database driver as determined by $driver's "get_driver"
function.
DIAGNOSTICS
No errors are created by Data::ObjectDriver::Driver::Partition itself. Errors may come from a specific partitioning subclass or the driver
for a particular database.
BUGS AND LIMITATIONS
There are no known bugs in this module.
SEE ALSO
Data::ObjectDriver::Driver::SimplePartition
LICENSE
Data::ObjectDriver is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR & COPYRIGHT
Except where otherwise noted, Data::ObjectDriver is Copyright 2005-2006 Six Apart, cpan@sixapart.com. All rights reserved.
perl v5.12.4 2011-08-29 Data::ObjectDriver::Driver::Partition(3pm)