mapper

How do I rename files when included in a jar by ant's jar task?

I want to put a set of files that look like this into a jar: yay/my.jar boo/my.jar foo/my.jar bar/my.jar In the process, I want all of them renamed as follows: yay_my.jar boo_my.jar foo_my.jar bar_my.jar I was hoping to use a mapper to accomplish this, but the fileset elements I am using and the jar task don't seem to support it an...

Sqlalchemy - Can we use date comparison in relation definition ?

Hi, I have this mapper defined: mapper(Resource, resource_table, properties = {'type' : relation(ResourceType,lazy = False), 'groups' : relation(Group, secondary = model.tables['resource_group'], backref = 'resources'), 'parent' : relation(Relation, uselist=False, primaryjoin = and_(relation_table.c.res_id == resourc...

Dozer Example Tutorial

Hi, Are there any good tutorials on Dozer Mapper? ...

Symphonia (CSV file)

Hi I'm trying to do a route in Rhapsody that transform CSV to ASTM. The problem is when i'm going to test the mapper, appears this error: unable to parse message. The character encoding may not have been recognised correctly. I don't know what to do. I hope you can help me. Thanks for all ...

Having two sets of input combined on hadoop

I have a rather simple hadoop question which I'll try to present with an example say you have a list of strings and a large file and you want each mapper to process a piece of the file and one of the strings in a grep like program. how are you supposed to do that? I am under the impression that the number of mappers is a result of the ...

Sitemesh CookieDecoratorMapper xml markup example?

If anyone could show me how to mark up sitemesh.xml for the CookieDecoratorMapper I would appreciate it. Here's what I have now: 1) A cookie named "sitemesh" with a value of "green". 2) A decorator named "decorator-green.jsp". 3) A default decorator named "decorator.jsp". 4) All URLs mapped to decorator.jsp in decorators.xml. 5) The fol...

C# generics based object to object mapper question

I have the need for an object to object mapper in my application. I've tried out a few, but haven't been able to find anything that fits my needs, so I'm writing my own. Currently I have an interface like below: public interface IMapper<T, R> { T Map(R obj); } I then implement an AccountMapper that maps a Customer to an Account ...

iBatis multiple parameter mapper method

Hi, Let's say I have a query getUser with two parameters - userName and password. I'd like to have a mapper method looking like this: public UserBean getUser(String userName, String password); Is there any way I can achieve something like that? Or maybe I should pass in my mapper method map of parameters (and some parameterMap in my ...

how to find the id of each map task?

Hello I want to get the id of each mapper and reducer task because I want to tag the output of these mappers and reducers according to the mapper and reducer id. How can I retrieve the ids of each? Thanks ...

Ant mapper: Changing file name using a property

I have a ant property app.prod= production During the an build, I want to replace all files in a particular directory with production in its name to same nma e without 'production' in it. Example File names are abcproduction.xls cdeproduction.xls I want to remove change the file names to abc.xls cde.xls <regexpmapper from="(.*)$...

What is the `connection` parameter of MapperExtension in sqlalchemy?

The class MapperExtension has some methods, and before_insert, before_update, ... all have a parameter connection. def before_insert(self, mapper, connection, instance): I've read the documents of MapperExtension, but found nothing about this connection. What is it? And how to use it? ...

Lift MapperField Objects

Hi, Why the mapper fields in Lift framework is defined as Objects inside the class? Why not them as vals? When I look at their Wiki page, it says that for some internal reasons of Scala, we are making them as Objects instead of val or var. What is the internal reason or hinderence in Scala? ...

How to get a reference to a Lift MetaMapper object by name?

In modeling an audit table, I've included fields necessary to find the original record being audited (oid: String, className: String). I'd like to programmatically find the MetaMapper for the Mapper class name. For example, if I have: class Foo extends Mapper[Foo] { def getSingleton = Foo } object Foo extends Foo with MetaMapper[Fo...

Lift mapper afterCreate before afterSave

Hi, do you know why afterCreate methods are not invoked after creating the object? Look at this code: val c = Company.create println(">>> After create") c.save Which produces: c: com.subeli.officebook.model.Company = 0 >>> After create create packages create packages save packages The Company model looks like this: object Company...