guru prasanth

Ranch Hand
+ Follow
since Aug 20, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by guru prasanth

I download the hadoop code from

https://hadoop.apache.org/docs/r2.6.3/hadoop-project-dist/hadoop-common/SingleCluster.html#Standalone_Operation

After following the instructions and when i run hadoop iam getting the following error
Error: JAVA_HOME is incorrectly set.
Please update D:\hadoop-2.6.3\conf\hadoop-env.cmd


There is no conf folder so i created a config folder and copied this folder D:\hadoop-2.6.3\etc\hadoop to D:\hadoop-2.6.3\conf



In hadoop-env.cmd i have set the java path properly as well as in my local path variable.


Secondly when i googled i found this resource.

http://www.codeproject.com/Articles/757934/Apache-Hadoop-for-Windows-Platform

I have updated java path and other HADOOP_HOME AND JAVA_HOME appropiately



when i did the set as per them also iam getting same error as above.


Then i went here https://sundersinghc.wordpress.com/2013/04/08/running-hadoop-on-cygwin-in-windows-single-node-cluster/ and followed the steps as per them

in cygwin that error is gone.But when i run the command hdfs namenode -format


java.lang.NoClassDefFoundError: org/apache/hadoop/hdfs/server/namenode/NameNode
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hdfs.server.namenode.NameNode
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.hadoop.hdfs.server.namenode.NameNode. Program will exit.
Exception in thread "main"


The class is in this hadoop-hdfs-2.6.3.jar and it's in this path



D:\hadoop-2.6.3\libexec\share\hadoop\hdfs

and if i do hadoop -classpath command i get this

/cygdrive/d/Hadoop-2.3-master/libexec/etc/hadoop:/cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/common/lib/*:/cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/common/*:/cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/hdfs:/cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/hdfs/lib/*:/cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/hdfs/*:/cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/yarn/lib/*:/cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/yarn/*:/cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/mapreduce/lib/*:/cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/mapreduce/*



this jar file is in this folder /cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/hdfs and /cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/hdfs/lib/*


Please let me know where iam going wrong.



8 years ago
Thanks for all your reply.The real issue is i have a war which consists on only static contents.And the pre-condition is no java code should be added.Even filters are not allowed.All
i can do it to tweak web.xml.Is it possible to stop the url anything other than the intended url.Let's say after www.website.com/index.html we shoulld not allow anyththingafter index.html.
is it possible to achive this using url patterns.
9 years ago
I have a requirement that in for a web application only cerain urls should be allowed.for example www.mywebsite.com/example/test.html the user should not be able to pass www.mywebsite.com/example/test.html?name=test123.
How do i do that in web.xml
9 years ago
Yes iam using security validation framework and it can pick this up.
9 years ago
The reason why i want to implement HttpServletRequest is that i want to override request.getparameter().Th requirement is for each paramter we need to validate the the value for certain injection.
If i use customised HttpServletRequestWapper in my servlet do i need to cast it by HttpServletRequestWapper or can i just use HttpServletRequest.getparamter
9 years ago
I have an existing webapplication.I want to change the HTTPServletRequest to my customised HttpServletRequest for my application.The issue here is there are lots of references to HTTPServletRequest in servlets.I do not have mandate to change all the servletRequest manually.I can use filters but still i need to change all HTTPServletRequest.For that is there a way to inject my custom HTTPServletRequest across servlets without changing all the values since HTTPServletRequest is an interface
9 years ago
Hi,
Iam trying to upload jpeg image.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Insert title here</title>

</head>
<body>
<form action="http://localhost:8080/app/action" method="POST" enctype="application/x-www-form-urlencoded">
Image <input type="file" name="test" length=10/>

<input type="submit" />
</form>

</body>
</html>

In servlet the below code

DataInputStream din = new DataInputStream(request.getInputStream());



byte[] data = new byte[0];
byte[] buffer = new byte[50];
int bytesRead;
while ((bytesRead = din.read(buffer)) > 0 ) {

byte[] nData = new byte[data.length + bytesRead];
System.arraycopy(data, 0, nData, 0, data.length);
System.arraycopy(buffer, 0, nData, data.length, bytesRead);
data = newData;
}

What i see is servletinput stream does't have any values.It does't even enter while loop.
11 years ago
I have used visual padigrajm community edition.When i convert my class diagrams iam seeing the visual padigram text in background.Is it allowed or not?

Not really.Only hint that will be available would be is that it would tell choose all that apply.That would mean that there are more than one correct answers.
Beyond that there would be no other hints.
Hi,
Iam done with the assignments but have very little time to reiew.Iam not quite sure if i want to submit my assignment as iam not satisfied.
But my voucher is going to expire shortly.But iam contemplate if it would be a good idea just to submit the assignment.If i fail again i need to
resubmit but i can submit the same assignment.But if my voucher gets expired then i might get new assigment.Again i might have to start from scrath.
Which is statergically a better option please advice me on that.
In JSF can i write a cusomt validator for validating the business rules.Similarly i need to convert the ui components into
an xml or in to a java object.Can i use a custom convertors.Or should i use backing bean for both validation and conversion.
I know i can use both but which is better according to JSF Best practise.
1) in class diagram what's difference between association and uage

2) can a Entity bean(JPA) be super class of session bean

3) should all the classes in the assignment be part of class diagram
1) Which is a good matirial to look for capacity planning?Iam talking in terms of deployment diagram.

in my assignment i have usecases.But due to various reasons like performance,fucntioanal i have to split the use case in to multiple sequence diagrams.Is that fine?Overall all the use case
has been taken care with my sequence diagram.