Skip to Main Content

Data Lake & Services

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

[HELP] "streaming JAR is not found" during MapReduce with R

822381Jan 29 2013 — edited Jan 30 2013
After I upgrade my ORCH-1.1 to 2.0, I got an error like this when execute MapReduce via R:
DBG: 11:12:00 [ER] streaming JAR is not found at "/home/hadoop/hadoop-0.20.2/contrib/streaming/hadoop-0.20.2-streaming.jar"
Error: execution aborted
BTW, I have specified environment variable "*HADOOP_STREAMING_JAR*" and the file */home/hadoop/hadoop-0.20.2/contrib/streaming/hadoop-0.20.2-streaming.jar* exists.
Could you please give some advice?
Thanks.

Edited by: 819378 on 2013-1-29 下午9:49

Comments

User_1871

Here's the DDL for creating the sample data:

create table vertices (
    asset_id    varchar2(10),
    part_num    number,
    vertex_num  number,
    x           number,
    y           number,
    m           number);

insert into vertices (asset_id,part_num,vertex_num,x,y,m) values ('001',1, 1, 0,   5, 0);
insert into vertices (asset_id,part_num,vertex_num,x,y,m) values ('001',1, 2, 10, 10, 11.18);
insert into vertices (asset_id,part_num,vertex_num,x,y,m) values ('001',1, 3, 30,  0, 33.54);
insert into vertices (asset_id,part_num,vertex_num,x,y,m) values ('001',2, 1, 50, 10, 33.54);
insert into vertices (asset_id,part_num,vertex_num,x,y,m) values ('001',2, 2, 60, 10, 43.54);

select * from vertices

ASSET_ID     PART_NUM VERTEX_NUM          X          Y          M
---------- ---------- ---------- ---------- ---------- ----------
001                 1          1          0          5          0
001                 1          2         10         10      11.18
001                 1          3         30          0      33.54
001                 2          1         50         10      33.54
001                 2          2         60         10      43.54
David Lapp-Oracle

Do you require the result geometry for each asset to be multiline even if there is no gap between parts? Or can result for an asset be line when parts are contiguous?

User_1871

@david-lapp-oracle I think either of the two options you mentioned would be fine.
Note that the sample MULTILINESTRING does have a gap between parts (is not contiguous).
Thanks!

David Lapp-Oracle

There are definitely more optimized and elegant ways to do this but here's a straightforward way.

create table lrs_test (asset_id varchar2(10), geometry sdo_geometry);

declare
geomPart sdo_geometry;
geomConcat sdo_geometry;
begin
for assetCur in (select distinct asset_id from vertices) loop
 geomConcat := null;
 for partCur in (select distinct part_num from vertices
                 where asset_id=assetCur.asset_id
                 order by part_num) loop
  geomPart   := SDO_GEOMETRY(3302,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,2,1),SDO_ORDINATE_ARRAY());
  for vertexCur in (select * from vertices
                    where asset_id=assetCur.asset_id and part_num=partCur.part_num
                    order by vertex_num) loop
    geomPart.sdo_ordinates.extend(3);
    geomPart.sdo_ordinates(geomPart.sdo_ordinates.count-2) := vertexCur.x;
    geomPart.sdo_ordinates(geomPart.sdo_ordinates.count-1) := vertexCur.y;  
    geomPart.sdo_ordinates(geomPart.sdo_ordinates.count)   := vertexCur.m;
  end loop;
 geomConcat := sdo_lrs.concatenate_geom_segments(geomConcat,geomPart, 0.005);
 end loop;
 insert into lrs_test values (assetCur.asset_id, geomConcat);
end loop;
end;
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 27 2013
Added on Jan 29 2013
1 comment
1,704 views